Class: Deli::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/deli/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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_classObject



9
10
11
# File 'lib/deli/model.rb', line 9

def model_class
  @model_class ||= name.to_s.camelize.constantize
end