Class: EventParsers::Http11Parser::HeaderAndEntityStateStore
- Inherits:
-
Object
- Object
- EventParsers::Http11Parser::HeaderAndEntityStateStore
- Defined in:
- bin/httphere
Instance Attribute Summary collapse
-
#bogus_lines ⇒ Object
Returns the value of attribute bogus_lines.
-
#delimiter ⇒ Object
Returns the value of attribute delimiter.
-
#entity_pos ⇒ Object
Returns the value of attribute entity_pos.
-
#entity_size ⇒ Object
Returns the value of attribute entity_size.
-
#linebuffer ⇒ Object
Returns the value of attribute linebuffer.
-
#state ⇒ Object
Returns the value of attribute state.
-
#textbuffer ⇒ Object
Returns the value of attribute textbuffer.
Instance Method Summary collapse
- #bogus_line!(ln = nil) ⇒ Object
- #entity? ⇒ Boolean
-
#initialize(state, delimiter) ⇒ HeaderAndEntityStateStore
constructor
A new instance of HeaderAndEntityStateStore.
- #reset! ⇒ Object
Constructor Details
#initialize(state, delimiter) ⇒ HeaderAndEntityStateStore
Returns a new instance of HeaderAndEntityStateStore.
338 339 340 341 342 |
# File 'bin/httphere', line 338 def initialize(state, delimiter) @state = state @delimiter = delimiter reset! end |
Instance Attribute Details
#bogus_lines ⇒ Object
Returns the value of attribute bogus_lines.
336 337 338 |
# File 'bin/httphere', line 336 def bogus_lines @bogus_lines end |
#delimiter ⇒ Object
Returns the value of attribute delimiter.
336 337 338 |
# File 'bin/httphere', line 336 def delimiter @delimiter end |
#entity_pos ⇒ Object
Returns the value of attribute entity_pos.
336 337 338 |
# File 'bin/httphere', line 336 def entity_pos @entity_pos end |
#entity_size ⇒ Object
Returns the value of attribute entity_size.
336 337 338 |
# File 'bin/httphere', line 336 def entity_size @entity_size end |
#linebuffer ⇒ Object
Returns the value of attribute linebuffer.
336 337 338 |
# File 'bin/httphere', line 336 def linebuffer @linebuffer end |
#state ⇒ Object
Returns the value of attribute state.
336 337 338 |
# File 'bin/httphere', line 336 def state @state end |
#textbuffer ⇒ Object
Returns the value of attribute textbuffer.
336 337 338 |
# File 'bin/httphere', line 336 def textbuffer @textbuffer end |
Instance Method Details
#bogus_line!(ln = nil) ⇒ Object
356 357 358 359 |
# File 'bin/httphere', line 356 def bogus_line!(ln=nil) log "bogus line:\n#{ln}\n" if ln && $DEBUG @bogus_lines += 1 end |
#entity? ⇒ Boolean
352 353 354 |
# File 'bin/httphere', line 352 def entity? !entity_size.nil? && entity_size > 0 end |
#reset! ⇒ Object
344 345 346 347 348 349 350 |
# File 'bin/httphere', line 344 def reset! @linebuffer = [] @textbuffer = [] @entity_size = nil @entity_pos = 0 @bogus_lines = 0 end |