module Entasis::Model::ClassMethods
Public Instance Methods
attributes(*attrs)
click to toggle source
Takes a list of attribute names.
Last argument can be an options hash:
strict: true - Raise UnknownAttributeError when given an unknown attribute.
# File lib/entasis/model.rb, line 24 def attributes(*attrs) self.attributes_config = attrs.last.is_a?(Hash) ? attrs.pop : {} self.attribute_names += attrs.map(&:to_s).sort attr_accessor *attrs end