Class: VectorNumber::SpecialUnit
- Inherits:
-
Object
- Object
- VectorNumber::SpecialUnit
- Defined in:
- lib/vector_number/special_unit.rb
Overview
Instance Method Summary collapse
-
#initialize(unit, text) ⇒ SpecialUnit
constructor
private
A new instance of SpecialUnit.
-
#inspect ⇒ String
Get string representation of the unit for debugging.
-
#to_s ⇒ String
Get predefined string representation of the unit.
Constructor Details
#initialize(unit, text) ⇒ SpecialUnit
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SpecialUnit.
17 18 19 20 |
# File 'lib/vector_number/special_unit.rb', line 17 def initialize(unit, text) @unit = unit @text = text end |
Instance Method Details
#inspect ⇒ String
Get string representation of the unit for debugging.
32 33 34 |
# File 'lib/vector_number/special_unit.rb', line 32 def inspect "unit/#{@unit}" end |
#to_s ⇒ String
Get predefined string representation of the unit.
25 26 27 |
# File 'lib/vector_number/special_unit.rb', line 25 def to_s @text end |