Class: Sitetap::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/sitetap/parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_dir) ⇒ Parser

Returns a new instance of Parser.



9
10
11
# File 'lib/sitetap/parser.rb', line 9

def initialize(root_dir)
  @root = root_dir
end

Class Method Details

.parse!(root_dir, selector = nil) ⇒ Object



13
14
15
16
# File 'lib/sitetap/parser.rb', line 13

def self.parse!(root_dir, selector = nil)
  parser = Sitetap::Parser.new(root_dir).parse!(selector)
  parser
end

Instance Method Details

#parse!(selector = nil) ⇒ Object



18
19
20
21
22
23
# File 'lib/sitetap/parser.rb', line 18

def parse!(selector = nil)
  @selector = selector unless selector.nil?
  verify_directories
  do_the_loop
  self
end