Class: Brutal::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/brutal/configuration.rb

Overview

Brutal::Configuration

Since:

  • 1.0.0

Constant Summary collapse

HEAD =

Since:

  • 1.0.0

'# Brutal test suite'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actuals: [], contexts: {}, header: HEAD, subject: '') ⇒ Configuration

Returns a new instance of Configuration.

Raises:

  • (::TypeError)

Since:

  • 1.0.0



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/brutal/configuration.rb', line 12

def initialize(actuals: [], contexts: {}, header: HEAD, subject: '')
  raise ::TypeError, actuals.inspect  unless actuals.is_a?(::Array)
  raise ::TypeError, contexts.inspect unless contexts.is_a?(::Hash)
  raise ::TypeError, header.inspect   unless header.is_a?(::String)
  raise ::TypeError, subject.inspect  unless subject.is_a?(::String)

  @actuals  = actuals
  @contexts = contexts
  @header   = header
  @subject  = subject
end

Instance Attribute Details

#actualsObject (readonly)

Since:

  • 1.0.0



10
11
12
# File 'lib/brutal/configuration.rb', line 10

def actuals
  @actuals
end

#contextsObject (readonly)

Since:

  • 1.0.0



10
11
12
# File 'lib/brutal/configuration.rb', line 10

def contexts
  @contexts
end

#headerObject (readonly)

Since:

  • 1.0.0



10
11
12
# File 'lib/brutal/configuration.rb', line 10

def header
  @header
end

#subjectObject (readonly)

Since:

  • 1.0.0



10
11
12
# File 'lib/brutal/configuration.rb', line 10

def subject
  @subject
end