Module: DSLize::Methods::Base::ClassMethods
- Defined in:
- lib/dslize/dslize.rb
Instance Method Summary collapse
- #abstract ⇒ Object
- #double(attr, args = {}) ⇒ Object
- #has_many(attr, args = {}) ⇒ Object
- #has_one(attr, args = {}) ⇒ Object
- #integer(attr, args = {}) ⇒ Object
- #root ⇒ Object
- #string(attr, args = {}) ⇒ Object
Instance Method Details
#abstract ⇒ Object
64 65 66 |
# File 'lib/dslize/dslize.rb', line 64 def abstract DSLize.current_object[:abstract] = true end |
#double(attr, args = {}) ⇒ Object
48 49 50 |
# File 'lib/dslize/dslize.rb', line 48 def double(attr, args = {}) attribute(:double, attr, args) end |
#has_many(attr, args = {}) ⇒ Object
52 53 54 |
# File 'lib/dslize/dslize.rb', line 52 def has_many(attr, args = {}) relation(:has_many, attr, args) end |
#has_one(attr, args = {}) ⇒ Object
56 57 58 |
# File 'lib/dslize/dslize.rb', line 56 def has_one(attr, args = {}) relation(:has_one, attr, args) end |
#integer(attr, args = {}) ⇒ Object
44 45 46 |
# File 'lib/dslize/dslize.rb', line 44 def integer(attr, args = {}) attribute(:integer, attr, args) end |
#root ⇒ Object
60 61 62 |
# File 'lib/dslize/dslize.rb', line 60 def root DSLize.current_object[:root] = true end |
#string(attr, args = {}) ⇒ Object
40 41 42 |
# File 'lib/dslize/dslize.rb', line 40 def string(attr, args = {}) attribute(:string, attr, args) end |