Class: Saxxy::Parsers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/saxxy/parsers/base.rb

Direct Known Subclasses

Libxml, Nokogiri, Ox

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context_tree, options = {}) ⇒ Base

Returns a new instance of Base.



9
10
11
12
# File 'lib/saxxy/parsers/base.rb', line 9

def initialize(context_tree, options = {})
  @context_tree = context_tree
  @options = options
end

Instance Attribute Details

#context_treeObject (readonly)

Returns the value of attribute context_tree.



7
8
9
# File 'lib/saxxy/parsers/base.rb', line 7

def context_tree
  @context_tree
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/saxxy/parsers/base.rb', line 7

def options
  @options
end

Instance Method Details

#parse_file(path_to_file) ⇒ Object

Raises:



14
15
16
# File 'lib/saxxy/parsers/base.rb', line 14

def parse_file(path_to_file)
  raise NotImplemented
end

#parse_io(io) ⇒ Object

Raises:



22
23
24
# File 'lib/saxxy/parsers/base.rb', line 22

def parse_io(io)
  raise NotImplemented
end

#parse_string(string) ⇒ Object

Raises:



18
19
20
# File 'lib/saxxy/parsers/base.rb', line 18

def parse_string(string)
  raise NotImplemented
end