Module: ODDB::AddressObserver

Included in:
Company, Doctor, Hospital, TestAddressObserver::Observer
Defined in:
src/model/address.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) addresses

Returns the value of attribute addresses



129
130
131
# File 'src/model/address.rb', line 129

def addresses
  @addresses
end

- (Object) fullname (readonly)

Returns the value of attribute fullname



130
131
132
# File 'src/model/address.rb', line 130

def fullname
  @fullname
end

Instance Method Details

- (Object) address(pos)



131
132
133
# File 'src/model/address.rb', line 131

def address(pos)
  @addresses[pos.to_i]
end

- (Object) address_item(key, pos = 0)



134
135
136
137
138
# File 'src/model/address.rb', line 134

def address_item(key, pos=0)
  if(addr = @addresses.at(pos))
    addr.send(key)
  end
end

- (Object) create_address(pos = nil)



139
140
141
142
143
# File 'src/model/address.rb', line 139

def create_address(pos=nil)
  addr = Address2.new
  @addresses.push(addr)
  addr
end

- (Object) ydim_address_lines(pos = 0)



144
145
146
# File 'src/model/address.rb', line 144

def ydim_address_lines(pos=0)
  address_item(:ydim_lines, pos) || []
end

- (Object) ydim_location(pos = 0)



147
148
149
# File 'src/model/address.rb', line 147

def ydim_location(pos=0)
  address_item(:location, pos)
end