Class: Tanuki::Argument::Base
Overview
Tanuki::Argument::Base is the base class for argument types.
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(default) ⇒ Base
constructor
Initializes the argument with a
defaultvalue. -
#to_s ⇒ Object
Returns a string representation of the argument value.
Constructor Details
#initialize(default) ⇒ Base
Initializes the argument with a default value.
10 11 12 |
# File 'lib/tanuki/argument/base.rb', line 10 def initialize(default) @value = @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
7 8 9 |
# File 'lib/tanuki/argument/base.rb', line 7 def default @default end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/tanuki/argument/base.rb', line 7 def value @value end |
Instance Method Details
#to_s ⇒ Object
Returns a string representation of the argument value.
15 16 17 |
# File 'lib/tanuki/argument/base.rb', line 15 def to_s @value.to_s end |