Module: MR::FakeRecord::Attributes::ClassMethods
- Defined in:
- lib/mr/fake_record/attributes.rb
Instance Method Summary collapse
- #attribute(name, type, options = nil) ⇒ Object
- #attributes ⇒ Object
-
#columns ⇒ Object
ActiveRecord methods.
Instance Method Details
#attribute(name, type, options = nil) ⇒ Object
20 21 22 |
# File 'lib/mr/fake_record/attributes.rb', line 20 def attribute(name, type, = nil) self.attributes.add(self, name, type, ) end |
#attributes ⇒ Object
16 17 18 |
# File 'lib/mr/fake_record/attributes.rb', line 16 def attributes @attributes ||= MR::FakeRecord::AttributeSet.new end |
#columns ⇒ Object
ActiveRecord methods
26 27 28 |
# File 'lib/mr/fake_record/attributes.rb', line 26 def columns self.attributes.to_a end |