module TimestampAPI::ModelAttributes::ClassMethods
Public Instance Methods
has_attributes(*attributes)
click to toggle source
# File lib/timestamp_api/model_attributes.rb, line 19 def has_attributes(*attributes) # Add those attributes to the list of attributes for this class self.class_variable_set(:@@attributes, self.class_variable_get(:@@attributes) + attributes) # Define getters for those attributes self.send(:attr_accessor, *attributes) end