class ModelWithAttributes

Public Instance Methods

attributes() click to toggle source
# File activemodel/test/cases/attribute_methods_test.rb, line 14
def attributes
  { foo: "value of foo", baz: "value of baz" }
end

Private Instance Methods

attribute(name) click to toggle source
# File activemodel/test/cases/attribute_methods_test.rb, line 19
def attribute(name)
  attributes[name.to_sym]
end