Class: Subshift::Options
- Inherits:
-
Object
- Object
- Subshift::Options
- Defined in:
- lib/subshift/options.rb
Instance Attribute Summary collapse
-
#delay ⇒ Object
readonly
Returns the value of attribute delay.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize(argv) ⇒ Options
Returns a new instance of Options.
7 8 9 10 11 12 13 14 15 |
# File 'lib/subshift/options.rb', line 7 def initialize(argv) parse(argv) self.source, self.delay = argv unless destination self.destination = source end end |
Instance Attribute Details
#delay ⇒ Object
Returns the value of attribute delay.
5 6 7 |
# File 'lib/subshift/options.rb', line 5 def delay @delay end |
#destination ⇒ Object
Returns the value of attribute destination.
5 6 7 |
# File 'lib/subshift/options.rb', line 5 def destination @destination end |
#source ⇒ Object
Returns the value of attribute source.
5 6 7 |
# File 'lib/subshift/options.rb', line 5 def source @source end |