Class: Walky::Walker

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Walker

Returns a new instance of Walker.



20
21
22
# File 'lib/walky.rb', line 20

def initialize(hash)
  @hash = hash
end

Class Method Details

.parse(hash, path) ⇒ Object



36
37
38
# File 'lib/walky.rb', line 36

def self.parse(hash, path)
  Walky::Parser.parse(hash, path)
end

Instance Method Details

#[](path) ⇒ Object



24
25
26
# File 'lib/walky.rb', line 24

def [](path)
  parse(path)
end

#extract(path) ⇒ Object



40
41
42
# File 'lib/walky.rb', line 40

def extract(path)
  Walky::Parser.extract(@hash, path)
end

#parse(path) ⇒ Object



32
33
34
# File 'lib/walky.rb', line 32

def parse(path)
  Walker.parse(@hash, path)
end

#walk(path) ⇒ Object



28
29
30
# File 'lib/walky.rb', line 28

def walk(path)
  parse(path)
end