Class: HTTPLogAnalyzer::Element::Status
- Inherits:
-
HTTPLogAnalyzer::Element
- Object
- HTTPLogAnalyzer::Element
- HTTPLogAnalyzer::Element::Status
- Defined in:
- lib/http-log-analyzer/element/status.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
Methods inherited from HTTPLogAnalyzer::Element
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
7 8 9 |
# File 'lib/http-log-analyzer/element/status.rb', line 7 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'lib/http-log-analyzer/element/status.rb', line 8 def @message end |
Instance Method Details
#class ⇒ Object
15 16 17 |
# File 'lib/http-log-analyzer/element/status.rb', line 15 def class @code / 100 end |
#parse(string) ⇒ Object
10 11 12 13 |
# File 'lib/http-log-analyzer/element/status.rb', line 10 def parse(string) @code = string.to_i @message = Net::HTTP::STATUS_CODES[@code] end |