Class: Deli::Model
- Inherits:
-
Object
- Object
- Deli::Model
- Defined in:
- lib/deli/model.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Model
constructor
A new instance of Model.
- #model_class ⇒ Object
Constructor Details
#initialize(name) ⇒ Model
Returns a new instance of Model.
5 6 7 |
# File 'lib/deli/model.rb', line 5 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/deli/model.rb', line 3 def name @name end |
Instance Method Details
#model_class ⇒ Object
9 10 11 |
# File 'lib/deli/model.rb', line 9 def model_class @model_class ||= name.to_s.camelize.constantize end |