Class: LikeAVirgin::Options
- Inherits:
-
Object
- Object
- LikeAVirgin::Options
- Defined in:
- lib/like_a_virgin/options.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/like_a_virgin/options.rb', line 7 def initialize @count = 2 OptionParser.new do |opts| opts. = "Usage: luv [options]" opts.on('-c COUNT') do |c| @count = c end end.parse! end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
5 6 7 |
# File 'lib/like_a_virgin/options.rb', line 5 def count @count end |