Class: Spec::Example::ExampleDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/spec/example/example_description.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description, options = {}, backtrace = nil) ⇒ ExampleDescription

Returns a new instance of ExampleDescription.



6
7
8
# File 'lib/spec/example/example_description.rb', line 6

def initialize(description, options={}, backtrace=nil)
  @description, @options, @backtrace = description, options, backtrace
end

Instance Attribute Details

#backtraceObject (readonly)

Returns the value of attribute backtrace.



4
5
6
# File 'lib/spec/example/example_description.rb', line 4

def backtrace
  @backtrace
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/spec/example/example_description.rb', line 4

def description
  @description
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/spec/example/example_description.rb', line 4

def options
  @options
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/spec/example/example_description.rb', line 10

def ==(other)
  (other.description == description) & (other.backtrace == backtrace)
end