Class: PluckMap::Presenter

Inherits:
Object
  • Object
show all
Includes:
CsvPresenter, HashPresenter, JsonPresenter
Defined in:
lib/pluck_map/presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CsvPresenter

#to_csv

Methods included from HashPresenter

#to_h

Methods included from JsonPresenter

#to_json

Constructor Details

#initialize(model, attributes) ⇒ Presenter

Returns a new instance of Presenter.



14
15
16
17
# File 'lib/pluck_map/presenter.rb', line 14

def initialize(model, attributes)
  @model = model
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



12
13
14
# File 'lib/pluck_map/presenter.rb', line 12

def attributes
  @attributes
end

#modelObject (readonly)

Returns the value of attribute model.



12
13
14
# File 'lib/pluck_map/presenter.rb', line 12

def model
  @model
end