Class: RespondForHelper::Lookups::Flash

Inherits:
Object
  • Object
show all
Defined in:
lib/respond_for_helper/lookups/flash.rb

Instance Method Summary collapse

Constructor Details

#initialize(controller, options) ⇒ Flash

Returns a new instance of Flash.



6
7
8
9
10
11
# File 'lib/respond_for_helper/lookups/flash.rb', line 6

def initialize(controller, options)
  @controller = controller
  @options = options

  @controller_config = @controller.class.respond_for_config
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
# File 'lib/respond_for_helper/lookups/flash.rb', line 13

def call
  if @controller_config[:flasher]
    @controller_config[:flasher]
  else
    Config.flasher
  end
end