Class: Rlyeh::DeepOnes::Parser
- Inherits:
-
Object
- Object
- Rlyeh::DeepOnes::Parser
- Includes:
- Logger
- Defined in:
- lib/rlyeh/deep_ones/parser.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Parser
constructor
A new instance of Parser.
Methods included from Logger
Constructor Details
#initialize(app) ⇒ Parser
Returns a new instance of Parser.
9 10 11 |
# File 'lib/rlyeh/deep_ones/parser.rb', line 9 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rlyeh/deep_ones/parser.rb', line 13 def call(env) begin = Ircp.parse env.data env. = env.event = .command.to_s.downcase @app.call env if @app rescue Ircp::ParseError => e debug "#{e.class}: #{e.to_s}" end end |