Module: Gugl::Search::Displayers::DisplayerMapper
- Extended by:
- DisplayerMapper
- Included in:
- DisplayerMapper
- Defined in:
- lib/search/displayers/displayer_mapper.rb
Constant Summary collapse
- DISPLAYERS =
{ term: ->{ Displayers::TerminalResultDisplayer.new }, mini_term: ->{ Displayers::MiniTerminalResultDisplayer.new }, }
- DEFAULT_DISPLAYER =
:term
Instance Method Summary collapse
Instance Method Details
#[](key) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/search/displayers/displayer_mapper.rb', line 17 def [](key) if key == :default DISPLAYERS[DEFAULT_DISPLAYER].call else DISPLAYERS[key].call end end |