Class: Thing

Inherits:
ActiveRecord::Base show all
Defined in:
lib/vendor/plugins/rspec-rails/spec/resources/models/thing.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Spec::Rails::Extensions::ActiveRecord::ClassMethods

#records

Methods included from Resourceful::Serialize::Model

#serialize, #to_serializable

Methods included from Spec::Rails::Extensions::ActiveRecord::InstanceMethods

#errors_on

Constructor Details

#initialize(arg = nil) ⇒ Thing

Returns a new instance of Thing.



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

def initialize(arg=nil)
  @arg = arg || :default
end

Instance Attribute Details

#argObject (readonly)

Returns the value of attribute arg.



4
5
6
# File 'lib/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb', line 4

def arg
  @arg
end

Instance Method Details

#==(other) ⇒ Object



8
9
10
# File 'lib/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb', line 8

def ==(other)
  @arg == other.arg
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb', line 11

def eql?(other)
  @arg == other.arg
end