Class: Gettc::Type
- Inherits:
-
Object
- Object
- Gettc::Type
- Defined in:
- lib/gettc/types.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(is_object) ⇒ Type
constructor
A new instance of Type.
- #obj? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(is_object) ⇒ Type
Returns a new instance of Type.
14 15 16 |
# File 'lib/gettc/types.rb', line 14 def initialize(is_object) @is_object = is_object end |
Instance Method Details
#obj? ⇒ Boolean
18 19 20 |
# File 'lib/gettc/types.rb', line 18 def obj? @is_object end |
#to_s ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/gettc/types.rb', line 22 def to_s return "#{subtype}[]" if self.is_a?(TArray) case self when TInt "int" when TLong "long" when TFloat "float" when TDouble "double" when TChar "char" when TString "String" when TBoolean "boolean" else "unknown" end end |