Class: Igniter::Contracts::Assembly::NodeType
- Inherits:
-
Struct
- Object
- Struct
- Igniter::Contracts::Assembly::NodeType
- Defined in:
- lib/igniter/contracts/assembly/node_type.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(kind:, metadata: {}) ⇒ NodeType
constructor
A new instance of NodeType.
- #requires_dsl? ⇒ Boolean
- #requires_runtime? ⇒ Boolean
Constructor Details
#initialize(kind:, metadata: {}) ⇒ NodeType
Returns a new instance of NodeType.
7 8 9 10 11 12 13 14 |
# File 'lib/igniter/contracts/assembly/node_type.rb', line 7 def initialize(kind:, metadata: {}) = { requires_dsl: true, requires_runtime: true }.merge().freeze super(kind: kind.to_sym, metadata: ) end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind
6 7 8 |
# File 'lib/igniter/contracts/assembly/node_type.rb', line 6 def kind @kind end |
#metadata ⇒ Object
Returns the value of attribute metadata
6 7 8 |
# File 'lib/igniter/contracts/assembly/node_type.rb', line 6 def @metadata end |
Instance Method Details
#requires_dsl? ⇒ Boolean
16 17 18 |
# File 'lib/igniter/contracts/assembly/node_type.rb', line 16 def requires_dsl? .fetch(:requires_dsl, true) end |
#requires_runtime? ⇒ Boolean
20 21 22 |
# File 'lib/igniter/contracts/assembly/node_type.rb', line 20 def requires_runtime? .fetch(:requires_runtime, true) end |