Class: RubyScreen::Configuration::Parser::Iterator
- Inherits:
-
Object
- Object
- RubyScreen::Configuration::Parser::Iterator
- Defined in:
- lib/ruby_screen/configuration/parser/iterator.rb
Instance Method Summary collapse
- #each_applicable_configuration_block {|current_preferences_block| ... } ⇒ Object
-
#initialize(arguments, preferences_hash) ⇒ Iterator
constructor
A new instance of Iterator.
Constructor Details
#initialize(arguments, preferences_hash) ⇒ Iterator
Returns a new instance of Iterator.
3 4 5 |
# File 'lib/ruby_screen/configuration/parser/iterator.rb', line 3 def initialize(arguments, preferences_hash) @arguments, @preferences_hash = arguments, preferences_hash end |
Instance Method Details
#each_applicable_configuration_block {|current_preferences_block| ... } ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/ruby_screen/configuration/parser/iterator.rb', line 7 def each_applicable_configuration_block(&block) yield current_preferences_block until preferences_exhausted? @preferences_hash = @preferences_hash[@arguments.first] @arguments.shift yield current_preferences_block end end |