Class: Spec::Expectations::Person

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/plugins/rspec/spec/support/spec_classes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Person

Returns a new instance of Person.



6
7
8
# File 'lib/vendor/plugins/rspec/spec/support/spec_classes.rb', line 6

def initialize name
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/vendor/plugins/rspec/spec/support/spec_classes.rb', line 5

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



9
10
11
# File 'lib/vendor/plugins/rspec/spec/support/spec_classes.rb', line 9

def == other
  return @name == other.name
end