Class: Rgot::PB
- Inherits:
-
Object
- Object
- Rgot::PB
- Defined in:
- lib/rgot/pb.rb
Instance Attribute Summary collapse
-
#bn ⇒ Object
Returns the value of attribute bn.
Instance Method Summary collapse
-
#initialize(bn: nil) ⇒ PB
constructor
Ruby-2.0.0 wants default value of keyword_argument.
- #next ⇒ Object
Constructor Details
#initialize(bn: nil) ⇒ PB
Ruby-2.0.0 wants default value of keyword_argument
6 7 8 9 |
# File 'lib/rgot/pb.rb', line 6 def initialize(bn: nil) raise ArgumentError, "missing keyword: bn" unless bn @bn = bn end |
Instance Attribute Details
#bn ⇒ Object
Returns the value of attribute bn.
3 4 5 |
# File 'lib/rgot/pb.rb', line 3 def bn @bn end |
Instance Method Details
#next ⇒ Object
11 12 13 |
# File 'lib/rgot/pb.rb', line 11 def next (0 < @bn).tap { @bn -= 1 } end |