Class: WorldBank::LendingType

Inherits:
Object
  • Object
show all
Defined in:
lib/world_bank/lending_type.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values = {}) ⇒ LendingType

Returns a new instance of LendingType.



15
16
17
18
19
20
# File 'lib/world_bank/lending_type.rb', line 15

def initialize(values={})
  @raw = values
  @id = values['id']
  @name = values['value']
  @type = 'lendingTypes'
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/world_bank/lending_type.rb', line 5

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/world_bank/lending_type.rb', line 5

def name
  @name
end

#rawObject (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/world_bank/lending_type.rb', line 5

def raw
  @raw
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/world_bank/lending_type.rb', line 5

def type
  @type
end

Class Method Details

.allObject



7
8
9
# File 'lib/world_bank/lending_type.rb', line 7

def self.all
  find('all')
end

.find(id) ⇒ Object



11
12
13
# File 'lib/world_bank/lending_type.rb', line 11

def self.find(id)
  WorldBank::ParamQuery.new('lendingTypes', id, self)
end