Class: EacConfig::PathsHash::PathSearch
- Inherits:
-
Object
- Object
- EacConfig::PathsHash::PathSearch
- Defined in:
- lib/eac_config/paths_hash/path_search.rb
Class Method Summary collapse
Instance Method Summary collapse
- #cursor ⇒ Object
- #ended? ⇒ Boolean
- #raise_error(message) ⇒ Object
- #succeeding ⇒ Object
- #to_s ⇒ Object
Class Method Details
.parse_entry_key(string) ⇒ Object
7 8 9 |
# File 'lib/eac_config/paths_hash/path_search.rb', line 7 def parse_entry_key(string) new(::EacConfig::PathsHash.parse_entry_key(string), []) end |
Instance Method Details
#cursor ⇒ Object
18 19 20 |
# File 'lib/eac_config/paths_hash/path_search.rb', line 18 def cursor current.first end |
#ended? ⇒ Boolean
22 23 24 |
# File 'lib/eac_config/paths_hash/path_search.rb', line 22 def ended? current.count <= 1 end |
#raise_error(message) ⇒ Object
26 27 28 |
# File 'lib/eac_config/paths_hash/path_search.rb', line 26 def raise_error() raise ::EacConfig::PathsHash::EntryKeyError, "#{} (#{self})" end |
#succeeding ⇒ Object
30 31 32 |
# File 'lib/eac_config/paths_hash/path_search.rb', line 30 def succeeding self.class.new(current[1..], previous + [cursor]) end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/eac_config/paths_hash/path_search.rb', line 34 def to_s "#{self.class}[Current: #{current}, Previous: #{previous}]" end |