Class: Tanuki::Argument::Integer
- Defined in:
- lib/tanuki/argument/integer.rb
Overview
Tanuki::Argument::Integer is a class for Integer arguments.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#to_value(obj) ⇒ Object
Returns argument value from an object
obj.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Tanuki::Argument::Base
Instance Method Details
#to_value(obj) ⇒ Object
Returns argument value from an object obj.
8 9 10 |
# File 'lib/tanuki/argument/integer.rb', line 8 def to_value(obj) begin Kernel::Integer obj rescue @default end end |