Class: DeadSimpleCMS::Group::Presenter::Base

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/dead_simple_cms/group/presenter/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view_context, group, *args) ⇒ Base

Returns a new instance of Base.



12
13
14
15
16
# File 'lib/dead_simple_cms/group/presenter/base.rb', line 12

def initialize(view_context, group, *args)
  @group = group
  initialize_extra_arguments(*args)
  super(view_context)
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



10
11
12
# File 'lib/dead_simple_cms/group/presenter/base.rb', line 10

def group
  @group
end

Instance Method Details

#initialize_extra_arguments(*args) ⇒ Object

Private: Initialize extra arguments for the presenter.



19
20
# File 'lib/dead_simple_cms/group/presenter/base.rb', line 19

def initialize_extra_arguments(*args)
end

#renderObject

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/dead_simple_cms/group/presenter/base.rb', line 22

def render
  raise(NotImplementedError, "Please define your own #render method.")
end