Class: ProconBypassMan::Procon::ModeRegistry2::Mode
- Inherits:
-
Object
- Object
- ProconBypassMan::Procon::ModeRegistry2::Mode
- Defined in:
- lib/procon_bypass_man/procon/mode_registry2.rb
Instance Attribute Summary collapse
-
#binaries ⇒ Object
Returns the value of attribute binaries.
-
#name ⇒ Object
Returns the value of attribute name.
-
#source_binaries ⇒ Object
Returns the value of attribute source_binaries.
Instance Method Summary collapse
-
#initialize(name:, binaries:) ⇒ Mode
constructor
A new instance of Mode.
- #next_binary ⇒ Object
Constructor Details
#initialize(name:, binaries:) ⇒ Mode
Returns a new instance of Mode.
5 6 7 8 9 |
# File 'lib/procon_bypass_man/procon/mode_registry2.rb', line 5 def initialize(name: , binaries: ) self.name = name self.binaries = binaries self.source_binaries = binaries.dup end |
Instance Attribute Details
#binaries ⇒ Object
Returns the value of attribute binaries.
3 4 5 |
# File 'lib/procon_bypass_man/procon/mode_registry2.rb', line 3 def binaries @binaries end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/procon_bypass_man/procon/mode_registry2.rb', line 3 def name @name end |
#source_binaries ⇒ Object
Returns the value of attribute source_binaries.
3 4 5 |
# File 'lib/procon_bypass_man/procon/mode_registry2.rb', line 3 def source_binaries @source_binaries end |
Instance Method Details
#next_binary ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/procon_bypass_man/procon/mode_registry2.rb', line 11 def next_binary binary = binaries.shift unless binary self.binaries = source_binaries.dup return binaries.shift end return binary end |