module Grabble
  class Vertex
    attr_reader :data

    def initialize(data)
      @data = data
    end
  end
end

module Grabble
  class Vertex
    def initialize(data)
      @data = data
    end

    def data
      @data
    end

  end
end

--- 
+++ 
@@ -1,12 +1,9 @@
 module Grabble
   class Vertex
+    attr_reader :data
+
     def initialize(data)
       @data = data
     end
-
-    def data
-      @data
-    end
-
   end
 end
Use attr_reader instead of manual getter method
