Class: PgVerify::Model::SpecResult

Inherits:
Object
  • Object
show all
Defined in:
lib/pg-verify/model/specs/spec_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec, success, trace) ⇒ SpecResult

Returns a new instance of SpecResult.



10
11
12
# File 'lib/pg-verify/model/specs/spec_result.rb', line 10

def initialize(spec, success, trace)
    @spec, @success, @trace = spec, success, trace
end

Instance Attribute Details

#specObject (readonly)

Returns the value of attribute spec.



6
7
8
# File 'lib/pg-verify/model/specs/spec_result.rb', line 6

def spec
  @spec
end

#successObject

Returns the value of attribute success.



7
8
9
# File 'lib/pg-verify/model/specs/spec_result.rb', line 7

def success
  @success
end

#traceObject

Returns the value of attribute trace.



8
9
10
# File 'lib/pg-verify/model/specs/spec_result.rb', line 8

def trace
  @trace
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/pg-verify/model/specs/spec_result.rb', line 18

def failure?()
    return !@success
end

#success?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/pg-verify/model/specs/spec_result.rb', line 14

def success?
    return @success
end