Class: AspectPresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/aspect_presenter.rb

Instance Method Summary collapse

Methods inherited from BasePresenter

as_collection

Constructor Details

#initialize(aspect) ⇒ AspectPresenter


2
3
4
# File 'app/presenters/aspect_presenter.rb', line 2

def initialize(aspect)
  @aspect = aspect
end

Instance Method Details

#as_jsonObject


6
7
8
9
10
# File 'app/presenters/aspect_presenter.rb', line 6

def as_json
  { :id => @aspect.id,
    :name => @aspect.name,
  }
end

#to_json(options = {}) ⇒ Object


12
13
14
# File 'app/presenters/aspect_presenter.rb', line 12

def to_json(options = {})
  as_json.to_json(options)
end