Class: T::Const
- Inherits:
-
Object
- Object
- T::Const
- Defined in:
- lib/json_model/types/const.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ Const
constructor
A new instance of Const.
- #to_type_spec(**options) ⇒ JsonModel::TypeSpec::Const
Constructor Details
#initialize(value) ⇒ Const
Returns a new instance of Const.
6 7 8 |
# File 'lib/json_model/types/const.rb', line 6 def initialize(value) @value = value end |
Class Method Details
.[](*args) ⇒ Const
18 19 20 |
# File 'lib/json_model/types/const.rb', line 18 def [](*args) Const.new(*args) end |
Instance Method Details
#to_type_spec(**options) ⇒ JsonModel::TypeSpec::Const
11 12 13 |
# File 'lib/json_model/types/const.rb', line 11 def to_type_spec(**) JsonModel::TypeSpec::Const.new(*@value, **) end |