Class: LittleGhost::AssemblyDefinition

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

Overview

An immutable, executable snapshot produced by an AssemblyBuilder.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AssemblyDefinition.



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

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



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

def assembly_id
  @assembly_id
end

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



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

def description
  @description
end

#implementationObject (readonly)

Returns the value of attribute implementation

Returns:

  • (Object)

    the current value of implementation



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

def implementation
  @implementation
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



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

def kind
  @kind
end