Class: LittleGhost::AssemblyDefinition

Inherits:
Data
  • Object
show all
Defined in:
lib/little_ghost/assembly_builder.rb,
lib/little_ghost/assembly_builder.rb

Overview

The immutable, executable snapshot produced by an AssemblyBuilder.

Runtime and other builders accept a definition anywhere they accept an Assembly reference. implementation is the sealed class instantiated for this snapshot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, assembly_id:, description:, implementation:) ⇒ AssemblyDefinition

Returns a new instance of AssemblyDefinition.



5
6
7
8
9
10
11
12
# File 'lib/little_ghost/assembly_builder.rb', line 5

def initialize(kind:, assembly_id:, description:, implementation:)
  super(
    kind: kind.to_sym,
    assembly_id: assembly_id.to_s.dup.freeze,
    description: description.to_s.dup.freeze,
    implementation:
  )
end

Instance Attribute Details

#assembly_idObject (readonly)

Returns the value of attribute assembly_id

Returns:

  • (Object)

    the current value of assembly_id



4
5
6
# File 'lib/little_ghost/assembly_builder.rb', line 4

def assembly_id
  @assembly_id
end

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



4
5
6
# File 'lib/little_ghost/assembly_builder.rb', line 4

def description
  @description
end

#implementationObject (readonly)

Returns the value of attribute implementation

Returns:

  • (Object)

    the current value of implementation



4
5
6
# File 'lib/little_ghost/assembly_builder.rb', line 4

def implementation
  @implementation
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



4
5
6
# File 'lib/little_ghost/assembly_builder.rb', line 4

def kind
  @kind
end