Class: Natsukantou::HandleRubyMarkup

Inherits:
Object
  • Object
show all
Includes:
UtilityBase
Defined in:
lib/natsukantou/handle_ruby_markup.rb

Instance Method Summary collapse

Methods included from Logger

#logger

Methods included from ParseXml

#dom, #dom_node

Constructor Details

#initialize(app) ⇒ HandleRubyMarkup

Returns a new instance of HandleRubyMarkup.



15
16
17
# File 'lib/natsukantou/handle_ruby_markup.rb', line 15

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



19
20
21
22
23
# File 'lib/natsukantou/handle_ruby_markup.rb', line 19

def call(env)
  env[:dom].css('ruby').each(&method(:process_node))

  @app.call(env)
end