Class: ODDB::StubRegistrationCompany

Inherits:
Object
  • Object
show all
Defined in:
test/test_model/registration.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (StubRegistrationCompany) initialize(name)

A new instance of StubRegistrationCompany



41
42
43
44
# File 'test/test_model/registration.rb', line 41

def initialize(name)
  @name = name
  @registrations = []
end

Instance Attribute Details

- (Object) name (readonly)

Returns the value of attribute name



40
41
42
# File 'test/test_model/registration.rb', line 40

def name
  @name
end

- (Object) registrations (readonly)

Returns the value of attribute registrations



40
41
42
# File 'test/test_model/registration.rb', line 40

def registrations
  @registrations
end

Instance Method Details

- (Object) add_registration(registration)



48
49
50
# File 'test/test_model/registration.rb', line 48

def add_registration(registration)
  @registrations.push(registration)
end

- (Object) oid



45
46
47
# File 'test/test_model/registration.rb', line 45

def oid
  1
end

- (Object) remove_registration(registration)



51
52
53
# File 'test/test_model/registration.rb', line 51

def remove_registration(registration)
  @registrations.delete_if { |reg| reg == registration }
end