Class: Lutaml::Model::Type::Float
- Inherits:
-
Value
- Object
- Value
- Lutaml::Model::Type::Float
show all
- Defined in:
- lib/lutaml/model/type/float.rb
Instance Attribute Summary
Attributes inherited from Value
#value
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Value
from_format, #initialize, #initialized?, register_format_to_from_methods, #to_s
Class Method Details
.cast(value, options = {}) ⇒ Object
.serialize(value) ⇒ Object
12
13
14
15
16
|
# File 'lib/lutaml/model/type/float.rb', line 12
def self.serialize(value)
return nil if value.nil?
cast(value)
end
|
Instance Method Details
#to_json(*_args) ⇒ Object
28
29
30
|
# File 'lib/lutaml/model/type/float.rb', line 28
def to_json(*_args)
value
end
|
#to_xml ⇒ Object
Instance methods for specific formats xs:float format
20
21
22
|
# File 'lib/lutaml/model/type/float.rb', line 20
def to_xml
value.to_s
end
|
#to_yaml ⇒ Object
24
25
26
|
# File 'lib/lutaml/model/type/float.rb', line 24
def to_yaml
value
end
|