Class: Gitlab::View::Presenter::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/view/presenter/factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(subject, **attributes) ⇒ Factory

Returns a new instance of Factory.



7
8
9
10
# File 'lib/gitlab/view/presenter/factory.rb', line 7

def initialize(subject, **attributes)
  @subject = subject
  @attributes = attributes
end

Instance Method Details

#fabricate!Object



12
13
14
# File 'lib/gitlab/view/presenter/factory.rb', line 12

def fabricate!
  presenter_class.new(subject, **attributes)
end