Class: Walky::Walker
- Inherits:
-
Object
- Object
- Walky::Walker
- Defined in:
- lib/walky.rb
Class Method Summary collapse
Instance Method Summary collapse
- #[](path) ⇒ Object
- #extract(path) ⇒ Object
-
#initialize(hash) ⇒ Walker
constructor
A new instance of Walker.
- #parse(path) ⇒ Object
- #walk(path) ⇒ Object
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
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 |