Class: Gitlab::View::Presenter::Simple

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/gitlab/view/presenter/simple.rb

Instance Method Summary collapse

Methods included from Base

#__subject__, #can?, #declarative_policy_delegate, #is_a?, #path_with_line_numbers, #present, #url_builder, #web_path, #web_url

Methods included from Allowable

#can?

Methods included from Routing

includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

#initialize(subject, **attributes) ⇒ Simple

Returns a new instance of Simple.



9
10
11
12
13
14
15
# File 'lib/gitlab/view/presenter/simple.rb', line 9

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

  attributes.each do |key, value|
    define_singleton_method(key) { value }
  end
end