Class: Arrow::ProcessingInstruction

Inherits:
HTMLToken show all
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

Attributes inherited from HTMLToken

#raw

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body.



331
332
333
# File 'lib/arrow/htmltokenizer.rb', line 331

def body
  @body
end

#instructionObject

Returns the value of attribute instruction.



331
332
333
# File 'lib/arrow/htmltokenizer.rb', line 331

def instruction
  @instruction
end