Module: Roda::RodaPlugins::Flashier

Defined in:
bridgetown-core/lib/roda/plugins/flashier.rb

Defined Under Namespace

Modules: FlashHashAdditions, FlashHashIndifferent, FlashNowHashIndifferent

Class Method Summary collapse

Class Method Details

.load_dependencies(app) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'bridgetown-core/lib/roda/plugins/flashier.rb', line 40

def self.load_dependencies(app)
  require "roda/plugins/flash"

  Roda::RodaPlugins::Flash::FlashHash.include FlashHashAdditions, FlashHashIndifferent
  Roda::RodaPlugins::Flash::FlashHash.class_eval do
    def initialize(hash = {})
      super(hash || {})
      now.singleton_class.include FlashHashAdditions, FlashNowHashIndifferent
      @next = {}
    end
  end
  app.plugin :flash
end