Class: Arrow::ProcessingInstruction
- Defined in:
- lib/arrow/htmltokenizer.rb
Overview
Class for tokens output by Arrow::HTMLTokenizer for the processing instructions contained in an HTML document.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#instruction ⇒ Object
Returns the value of attribute instruction.
Attributes inherited from HTMLToken
Instance Method Summary collapse
-
#initialize(raw) ⇒ ProcessingInstruction
constructor
:nodoc:.
Methods inherited from HTMLToken
#css_class, #escape_html, #to_html
Methods inherited from Object
deprecate_class_method, deprecate_method, inherited
Constructor Details
#initialize(raw) ⇒ ProcessingInstruction
:nodoc:
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
#body ⇒ Object
Returns the value of attribute body.
331 332 333 |
# File 'lib/arrow/htmltokenizer.rb', line 331 def body @body end |
#instruction ⇒ Object
Returns the value of attribute instruction.
331 332 333 |
# File 'lib/arrow/htmltokenizer.rb', line 331 def instruction @instruction end |