Class: Malline::Handler
- Inherits:
-
Object
- Object
- Malline::Handler
- Defined in:
- lib/malline/handler.rb
Instance Attribute Summary collapse
-
#parsed ⇒ Object
readonly
Returns the value of attribute parsed.
-
#token_line ⇒ Object
Returns the value of attribute token_line.
Instance Method Summary collapse
- #code(string, cmd = nil) ⇒ Object
- #data(string) ⇒ Object
-
#initialize ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
#initialize ⇒ Handler
Returns a new instance of Handler.
5 6 7 |
# File 'lib/malline/handler.rb', line 5 def initialize @parsed = [] end |
Instance Attribute Details
#parsed ⇒ Object (readonly)
Returns the value of attribute parsed.
3 4 5 |
# File 'lib/malline/handler.rb', line 3 def parsed @parsed end |
#token_line ⇒ Object
Returns the value of attribute token_line.
4 5 6 |
# File 'lib/malline/handler.rb', line 4 def token_line @token_line end |
Instance Method Details
#code(string, cmd = nil) ⇒ Object
9 10 11 |
# File 'lib/malline/handler.rb', line 9 def code string, cmd=nil @parsed << [:code, cmd, string, token_line] end |
#data(string) ⇒ Object
13 14 15 |
# File 'lib/malline/handler.rb', line 13 def data string @parsed << [:data, string, token_line] end |