Class: Model
- Inherits:
-
Object
- Object
- Model
- Defined in:
- lib/jenson/model.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, fields) ⇒ Model
constructor
A new instance of Model.
Constructor Details
#initialize(name, fields) ⇒ Model
Returns a new instance of Model.
14 15 16 17 18 19 |
# File 'lib/jenson/model.rb', line 14 def initialize(name, fields) if name.empty? || fields.empty? return end end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
12 13 14 |
# File 'lib/jenson/model.rb', line 12 def fields @fields end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/jenson/model.rb', line 11 def name @name end |