Class: Presenter::Base

Inherits:
SimpleDelegator
  • Object
show all
Extended by:
Name
Defined in:
lib/presenter.rb

Direct Known Subclasses

Form

Class Method Summary collapse

Methods included from Name

__name__

Class Method Details

.map(params) ⇒ Object



25
26
27
# File 'lib/presenter.rb', line 25

def self.map(params)
  params.each { |p| setup_attribute(p) }
end

.use(*presenters) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/presenter.rb', line 29

def self.use(*presenters)
  params = presenters.each_with_object({}) do |id, p|
    p[id] = id
  end

  map params
end