Module: Height::Model
- Defined in:
- lib/height/model.rb,
lib/height/model/base.rb,
lib/height/model/list.rb,
lib/height/model/task.rb,
lib/height/model/user.rb,
lib/height/model/activity.rb
Defined Under Namespace
Classes: Activity, Base, List, Task, User
Class Method Summary collapse
Class Method Details
.for(attrs) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/height/model.rb', line 8 def self.for(attrs) model = attrs['model'].capitalize model = attrs['type'].capitalize if model == 'View' Object.const_get("Height::Model::#{model}").new(attrs) end |