Module: ModelPresenter::ForwardFromModel

Defined in:
lib/model_presenter/forward_from_model.rb

Instance Method Summary collapse

Instance Method Details

#forward_from_model(*attributes) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/model_presenter/forward_from_model.rb', line 3

def forward_from_model(*attributes)
  attributes.each do |attr|
    self.send :define_method, attr do
      model.send(attr)
    end
  end
end