Class: Simmer::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/simmer/specification.rb,
lib/simmer/specification/act.rb,
lib/simmer/specification/stage.rb,
lib/simmer/specification/assert.rb,
lib/simmer/specification/act/params.rb,
lib/simmer/specification/stage/input_file.rb,
lib/simmer/specification/assert/assertions.rb,
lib/simmer/specification/assert/assertions/table.rb,
lib/simmer/specification/assert/assertions/output.rb,
lib/simmer/specification/assert/assertions/bad_table_assertion.rb,
lib/simmer/specification/assert/assertions/bad_output_assertion.rb

Overview

Describes a specification at the highest of levels.

Defined Under Namespace

Classes: Act, Assert, Stage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(act: {}, assert: {}, name:, path:, stage: {}) ⇒ Specification

Returns a new instance of Specification.

Raises:

  • (ArgumentError)


21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/simmer/specification.rb', line 21

def initialize(act: {}, assert: {}, name:, path:, stage: {})
  raise ArgumentError, 'name is required' if name.to_s.empty?
  raise ArgumentError, 'path is required' if path.to_s.empty?

  @act    = Act.make(act)
  @assert = Assert.make(assert)
  @name   = name.to_s
  @path   = path.to_s
  @stage  = Stage.make(stage)

  freeze
end

Instance Attribute Details

#actObject (readonly)

Returns the value of attribute act.



19
20
21
# File 'lib/simmer/specification.rb', line 19

def act
  @act
end

#assertObject (readonly)

Returns the value of attribute assert.



19
20
21
# File 'lib/simmer/specification.rb', line 19

def assert
  @assert
end

#nameObject (readonly)

Returns the value of attribute name.



19
20
21
# File 'lib/simmer/specification.rb', line 19

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



19
20
21
# File 'lib/simmer/specification.rb', line 19

def path
  @path
end

#stageObject (readonly)

Returns the value of attribute stage.



19
20
21
# File 'lib/simmer/specification.rb', line 19

def stage
  @stage
end