Class: Hector::Request
- Inherits:
-
Object
- Object
- Hector::Request
- Defined in:
- lib/hector/request.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#line ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute line.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #event_name ⇒ Object
-
#initialize(line) ⇒ Request
constructor
A new instance of Request.
- #sensitive? ⇒ Boolean
Constructor Details
#initialize(line) ⇒ Request
Returns a new instance of Request.
6 7 8 9 |
# File 'lib/hector/request.rb', line 6 def initialize(line) @line = line parse end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/hector/request.rb', line 3 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/hector/request.rb', line 3 def command @command end |
#line ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute line.
3 4 5 |
# File 'lib/hector/request.rb', line 3 def line @line end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
3 4 5 |
# File 'lib/hector/request.rb', line 3 def text @text end |
Instance Method Details
#event_name ⇒ Object
11 12 13 |
# File 'lib/hector/request.rb', line 11 def event_name "on_#{command.downcase}" end |
#sensitive? ⇒ Boolean
15 16 17 |
# File 'lib/hector/request.rb', line 15 def sensitive? command.downcase == "pass" end |