Class: UiBibz::Strategies::ComponentInitializeBlockStrategy

Inherits:
ComponentInitializeAbstractStrategy show all
Defined in:
lib/ui_bibz/strategies/component_initialize_block_strategy.rb

Overview

Class to initialize component

Instance Method Summary collapse

Methods inherited from ComponentInitializeAbstractStrategy

#initialize

Constructor Details

This class inherits a constructor from UiBibz::Strategies::ComponentInitializeAbstractStrategy

Instance Method Details

#contentObject



7
8
9
10
# File 'lib/ui_bibz/strategies/component_initialize_block_strategy.rb', line 7

def content
  context = eval('self', @block.binding) # rubocop:disable Style/EvalWithLocation
  read_cache.nil? ? context.capture(&@block) : read_cache
end

#html_optionsObject



16
17
18
# File 'lib/ui_bibz/strategies/component_initialize_block_strategy.rb', line 16

def html_options
  with_indifferent_access(@options)
end

#optionsObject



12
13
14
# File 'lib/ui_bibz/strategies/component_initialize_block_strategy.rb', line 12

def options
  with_indifferent_access(@content)
end

#tapped?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ui_bibz/strategies/component_initialize_block_strategy.rb', line 20

def tapped?
  UiBibz::Utils::Screwdriver.tapped?(@block)
end