Class: TJSON::DataType::NonScalar
- Inherits:
-
TJSON::DataType
- Object
- TJSON::DataType
- TJSON::DataType::NonScalar
- Defined in:
- lib/tjson/datatype.rb
Overview
Non-scalar types
Constant Summary
Constants inherited from TJSON::DataType
Instance Attribute Summary collapse
-
#inner_type ⇒ Object
readonly
Returns the value of attribute inner_type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(inner_type) ⇒ NonScalar
constructor
A new instance of NonScalar.
- #inspect ⇒ Object
- #scalar? ⇒ Boolean
Methods inherited from TJSON::DataType
[], generate, identify_type, parse
Constructor Details
#initialize(inner_type) ⇒ NonScalar
Returns a new instance of NonScalar.
60 61 62 |
# File 'lib/tjson/datatype.rb', line 60 def initialize(inner_type) @inner_type = inner_type end |
Instance Attribute Details
#inner_type ⇒ Object (readonly)
Returns the value of attribute inner_type.
58 59 60 |
# File 'lib/tjson/datatype.rb', line 58 def inner_type @inner_type end |
Instance Method Details
#==(other) ⇒ Object
72 73 74 |
# File 'lib/tjson/datatype.rb', line 72 def ==(other) self.class == other.class && inner_type == other.inner_type end |
#inspect ⇒ Object
64 65 66 |
# File 'lib/tjson/datatype.rb', line 64 def inspect "#<#{self.class}<#{@inner_type.inspect}>>" end |
#scalar? ⇒ Boolean
68 69 70 |
# File 'lib/tjson/datatype.rb', line 68 def scalar? false end |