Class: Arrow::ProcessingInstruction
Overview
Class for tokens output by Arrow::HTMLTokenizer for the processing instructions contained in an HTML document.
Instance Attribute Summary
-
- (Object) body
Returns the value of attribute body.
-
- (Object) instruction
Returns the value of attribute instruction.
Instance Method Summary
-
- (ProcessingInstruction) initialize(raw)
constructor
A new instance of ProcessingInstruction.
Methods inherited from HTMLToken
#css_class, #escape_html, #to_html
Methods inherited from Object
deprecate_class_method, deprecate_method, inherited
Methods included from Loggable
Constructor Details
- (ProcessingInstruction) initialize(raw)
A new instance of ProcessingInstruction
326 327 328 329 |
# File 'lib/arrow/htmltokenizer.rb', line 326 def initialize( raw ) @instruction, @body = raw.gsub(/^\?|\?$/, '').split( /\s+/, 2 ) super end |
Instance Attribute Details
- (Object) body
Returns the value of attribute body
331 332 333 |
# File 'lib/arrow/htmltokenizer.rb', line 331 def body @body end |
- (Object) instruction
Returns the value of attribute instruction
331 332 333 |
# File 'lib/arrow/htmltokenizer.rb', line 331 def instruction @instruction end |