class Bogus::Interaction
Attributes
arguments[RW]
Public Class Methods
new(method, args, &block)
click to toggle source
# File lib/bogus/stubbing/interaction.rb, line 9 def initialize(method, args, &block) self.method = method self.args = args if block_given? evaluate_return_value(block) self.has_result = true end end
same?(opts = {})
click to toggle source
# File lib/bogus/stubbing/interaction.rb, line 5 def self.same?(opts = {}) InteractionComparator.new(opts).same? end
Private Instance Methods
evaluate_return_value(block)
click to toggle source
# File lib/bogus/stubbing/interaction.rb, line 21 def evaluate_return_value(block) self.return_value = block.call rescue => e self.error = e.class end