class Extentions::Collection

Attributes

extentions[R]
model[R]

Public Class Methods

new(model, extentions) click to toggle source
# File lib/extentions.rb, line 34
def initialize(model, extentions)
  @extentions = extentions
  @model = model
end

Public Instance Methods

build_presenter() click to toggle source
# File lib/extentions.rb, line 45
def build_presenter
  rendered = extentions.each_with_object({}) do |extention, rendered|
    rendered[extention.to_token] = -> { extention.render }
  end
  Presenter.new(model, rendered)
end
process!(*params) click to toggle source
# File lib/extentions.rb, line 39
def process!(*params)
  extentions.each do |extention|
    extention.process(*params)
  end
end