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

Instance Method Summary

Methods inherited from HTMLToken

#css_class, #escape_html, #to_html

Methods inherited from Object

deprecate_class_method, deprecate_method, inherited

Methods included from Loggable

#log

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