lib/columns/model_data.rb in columns-0.0.1 vs lib/columns/model_data.rb in columns-0.1.0

- old
+ new

@@ -1,8 +1,8 @@ module Columns - # Public: Stores data about a model. + # Stores data about a model. # # Model name # ---------- # Usually a table is named with a plural, like 'users'. The # corresponding model name is in singular, like 'user'. @@ -18,15 +18,19 @@ # what we want is something like this: # # # integer "foo" class ModelData - # Public: Get the model's name. For a model `app/models/user.rb`, + # Public: Get the String model's name. For a model `app/models/user.rb`, # the model's name will be `user`. attr_reader :name + # Public: Get a String formatted content. attr_reader :content + # Public: Creates a new ModelData. + # + # raw_data - A RawData object. def initialize(raw_data) # Ok, this is really idiot, I know, I know. Must use inflectors in # the future. @name = raw_data.name[0...-1]