Class: Kumi::SchemaMetadata::Definition
- Inherits:
-
Struct
- Object
- Struct
- Kumi::SchemaMetadata::Definition
- Defined in:
- lib/kumi/schema_metadata.rb
Overview
One definition: a named value or trait given by an expression over inputs and earlier definitions.
Instance Attribute Summary collapse
-
#axes ⇒ Object
Returns the value of attribute axes.
-
#expression ⇒ Object
Returns the value of attribute expression.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
-
#read_by ⇒ Object
Returns the value of attribute read_by.
-
#reads ⇒ Object
Returns the value of attribute reads.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#axes ⇒ Object
Returns the value of attribute axes
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def axes @axes end |
#expression ⇒ Object
Returns the value of attribute expression
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def expression @expression end |
#kind ⇒ Object
Returns the value of attribute kind
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def name @name end |
#read_by ⇒ Object
Returns the value of attribute read_by
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def read_by @read_by end |
#reads ⇒ Object
Returns the value of attribute reads
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def reads @reads end |
#type ⇒ Object
Returns the value of attribute type
35 36 37 |
# File 'lib/kumi/schema_metadata.rb', line 35 def type @type end |
Instance Method Details
#scalar? ⇒ Boolean
36 |
# File 'lib/kumi/schema_metadata.rb', line 36 def scalar? = axes.empty? |
#to_h ⇒ Object
39 40 41 42 43 44 |
# File 'lib/kumi/schema_metadata.rb', line 39 def to_h { name: name, kind: kind, type: type, axes: axes, expression: expression, reads: reads, read_by: read_by } end |
#vector? ⇒ Boolean
37 |
# File 'lib/kumi/schema_metadata.rb', line 37 def vector? = !axes.empty? |