Class: Flatware::RSpec::Marshalable::ExamplesNotification::Reporter

Inherits:
Struct
  • Object
show all
Defined in:
lib/flatware/rspec/marshalable/examples_notification.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#examplesObject

Returns the value of attribute examples

Returns:

  • (Object)

    the current value of examples



8
9
10
# File 'lib/flatware/rspec/marshalable/examples_notification.rb', line 8

def examples
  @examples
end

#failed_examplesObject

Returns the value of attribute failed_examples

Returns:

  • (Object)

    the current value of failed_examples



8
9
10
# File 'lib/flatware/rspec/marshalable/examples_notification.rb', line 8

def failed_examples
  @failed_examples
end

#pending_examplesObject

Returns the value of attribute pending_examples

Returns:

  • (Object)

    the current value of pending_examples



8
9
10
# File 'lib/flatware/rspec/marshalable/examples_notification.rb', line 8

def pending_examples
  @pending_examples
end

Class Method Details

.from_rspec(reporter) ⇒ Object



9
10
11
# File 'lib/flatware/rspec/marshalable/examples_notification.rb', line 9

def self.from_rspec(reporter)
  new(*members.map { |member| reporter.public_send(member).map(&Example.method(:new)) })
end

Instance Method Details

#+(other) ⇒ Object



13
14
15
# File 'lib/flatware/rspec/marshalable/examples_notification.rb', line 13

def +(other)
  self.class.new(*zip(other).map { |a, b| a + b })
end