Class: ContentBlockTools::Presenters::BlockPresenters::BasePresenter

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::TextHelper
Defined in:
lib/content_block_tools/presenters/block_presenters/base_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ BasePresenter

Returns a new instance of BasePresenter.



10
11
12
# File 'lib/content_block_tools/presenters/block_presenters/base_presenter.rb', line 10

def initialize(item)
  @item = item
end

Instance Attribute Details

#itemObject (readonly)

Returns the value of attribute item.



8
9
10
# File 'lib/content_block_tools/presenters/block_presenters/base_presenter.rb', line 8

def item
  @item
end

Instance Method Details

#renderObject



18
# File 'lib/content_block_tools/presenters/block_presenters/base_presenter.rb', line 18

def render; end

#title_contentObject



14
15
16
# File 'lib/content_block_tools/presenters/block_presenters/base_presenter.rb', line 14

def title_content
  "#{item[:title]}: "
end