Class: KDL::Value::NullImpl
- Inherits:
-
KDL::Value
- Object
- KDL::Value
- KDL::Value::NullImpl
- Defined in:
- lib/kdl/value.rb
Direct Known Subclasses
Constant Summary
Constants inherited from KDL::Value
Instance Attribute Summary
Attributes inherited from KDL::Value
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(_ = nil, format: nil, type: nil) ⇒ NullImpl
constructor
A new instance of NullImpl.
- #stringify_value ⇒ Object
- #to_v1 ⇒ Object
Methods inherited from KDL::Value
#as_type, from, #inspect, #method_missing, #respond_to_missing?, #to_s, #to_v2, #version
Constructor Details
#initialize(_ = nil, format: nil, type: nil) ⇒ NullImpl
Returns a new instance of NullImpl.
125 126 127 |
# File 'lib/kdl/value.rb', line 125 def initialize(_=nil, format: nil, type: nil) super(nil, type: type) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class KDL::Value
Instance Method Details
#==(other) ⇒ Object
133 134 135 |
# File 'lib/kdl/value.rb', line 133 def ==(other) other.is_a?(NullImpl) || other.nil? end |
#stringify_value ⇒ Object
129 130 131 |
# File 'lib/kdl/value.rb', line 129 def stringify_value "#null" end |
#to_v1 ⇒ Object
137 138 139 |
# File 'lib/kdl/value.rb', line 137 def to_v1 type ? V1::Value::NullImpl.new(type:) : V1::Value::Null end |