Class: RSpec::Contracts::MessageArguments

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/contracts/message_arguments.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arguments) ⇒ MessageArguments

Returns a new instance of MessageArguments.



6
7
8
# File 'lib/rspec/contracts/message_arguments.rb', line 6

def initialize(arguments)
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



4
5
6
# File 'lib/rspec/contracts/message_arguments.rb', line 4

def arguments
  @arguments
end

Instance Method Details

#fully_described_by?(other) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/rspec/contracts/message_arguments.rb', line 10

def fully_described_by?(other)
  other && (arguments == other.arguments)
end

#to_hashObject



14
15
16
# File 'lib/rspec/contracts/message_arguments.rb', line 14

def to_hash
  {:arguments => arguments}
end