Module: ModelPresenter::Base
- Defined in:
- lib/model_presenter/base.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
10 11 12 13 14 |
# File 'lib/model_presenter/base.rb', line 10 def self.included(mod) mod.extend ForwardFromModel mod.extend AsJson mod.extend Moneyize end |
Instance Method Details
#initialize(model) ⇒ Object
16 17 18 |
# File 'lib/model_presenter/base.rb', line 16 def initialize(model) @model = model end |
#to_json(options = {}) ⇒ Object
20 21 22 |
# File 'lib/model_presenter/base.rb', line 20 def to_json(={}) JSON(as_json()) end |