Class: Kumi::SchemaMetadata::InputField
- Inherits:
-
Struct
- Object
- Struct
- Kumi::SchemaMetadata::InputField
- Defined in:
- lib/kumi/schema_metadata.rb
Overview
One input leaf: a typed, optionally domain-bounded free variable.
Instance Attribute Summary collapse
-
#axes ⇒ Object
Returns the value of attribute axes.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#element_path ⇒ Object
Returns the value of attribute element_path.
-
#path ⇒ Object
Returns the value of attribute path.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#address ⇒ Object
Dotted address, e.g.
-
#in_array ⇒ Object
Whether the leaf lives inside one or more arrays.
- #to_h ⇒ Object
Instance Attribute Details
#axes ⇒ Object
Returns the value of attribute axes
19 20 21 |
# File 'lib/kumi/schema_metadata.rb', line 19 def axes @axes end |
#domain ⇒ Object
Returns the value of attribute domain
19 20 21 |
# File 'lib/kumi/schema_metadata.rb', line 19 def domain @domain end |
#element_path ⇒ Object
Returns the value of attribute element_path
19 20 21 |
# File 'lib/kumi/schema_metadata.rb', line 19 def element_path @element_path end |
#path ⇒ Object
Returns the value of attribute path
19 20 21 |
# File 'lib/kumi/schema_metadata.rb', line 19 def path @path end |
#type ⇒ Object
Returns the value of attribute type
19 20 21 |
# File 'lib/kumi/schema_metadata.rb', line 19 def type @type end |
Instance Method Details
#address ⇒ Object
Dotted address, e.g. “scenarios.scenario.claiming_age”.
21 |
# File 'lib/kumi/schema_metadata.rb', line 21 def address = path.join(".") |
#in_array ⇒ Object
Whether the leaf lives inside one or more arrays.
24 |
# File 'lib/kumi/schema_metadata.rb', line 24 def in_array = !axes.empty? |
#to_h ⇒ Object
26 27 28 29 30 |
# File 'lib/kumi/schema_metadata.rb', line 26 def to_h h = { path: path, address: address, type: type, axes: axes, element_path: element_path } h[:domain] = domain.to_s if domain h end |