Class: Constant
- Inherits:
-
Object
- Object
- Constant
- Defined in:
- lib/ruby-constants.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ Constant
constructor
A new instance of Constant.
- #string ⇒ Object
- #type ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(value) ⇒ Constant
Returns a new instance of Constant.
3 4 5 |
# File 'lib/ruby-constants.rb', line 3 def initialize(value) @val = value end |
Instance Method Details
#string ⇒ Object
11 12 13 |
# File 'lib/ruby-constants.rb', line 11 def string return @val end |
#type ⇒ Object
15 16 17 |
# File 'lib/ruby-constants.rb', line 15 def type return @val.class end |
#value ⇒ Object
7 8 9 |
# File 'lib/ruby-constants.rb', line 7 def value return @val end |