Class: TSJSON::StringType
- Inherits:
-
ScalarType
- Object
- Base
- ScalarType
- TSJSON::StringType
- Defined in:
- lib/types/string.rb
Instance Attribute Summary
Attributes inherited from ScalarType
Instance Method Summary collapse
-
#initialize ⇒ StringType
constructor
A new instance of StringType.
- #validate(value) ⇒ Object
Methods inherited from ScalarType
Methods inherited from Base
#compile, #index, #property, #valid?
Constructor Details
#initialize ⇒ StringType
Returns a new instance of StringType.
5 6 7 |
# File 'lib/types/string.rb', line 5 def initialize super('String') end |
Instance Method Details
#validate(value) ⇒ Object
9 10 11 12 13 |
# File 'lib/types/string.rb', line 9 def validate(value) super(value) unless value.is_a?(::String) true end |