Class: Igniter::Contracts::Assembly::NodeType

Inherits:
Struct
  • Object
show all
Defined in:
lib/igniter/contracts/assembly/node_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



6
7
8
# File 'lib/igniter/contracts/assembly/node_type.rb', line 6

def kind
  @kind
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



6
7
8
# File 'lib/igniter/contracts/assembly/node_type.rb', line 6

def 
  @metadata
end

Instance Method Details

#requires_dsl?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


20
21
22
# File 'lib/igniter/contracts/assembly/node_type.rb', line 20

def requires_runtime?
  .fetch(:requires_runtime, true)
end