Class: Infostrada::Table
- Inherits:
-
BaseRequest
- Object
- BaseRequest
- Infostrada::Table
- Includes:
- Enumerable
- Defined in:
- lib/infostrada/table.rb
Constant Summary collapse
- URL =
'/GetTable'
Constants inherited from BaseRequest
Instance Attribute Summary collapse
-
#edition_id ⇒ Object
Returns the value of attribute edition_id.
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#phase_id ⇒ Object
Returns the value of attribute phase_id.
Class Method Summary collapse
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(phase_id, table_list) ⇒ Table
constructor
A new instance of Table.
Methods inherited from BaseRequest
Constructor Details
#initialize(phase_id, table_list) ⇒ Table
Returns a new instance of Table.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/infostrada/table.rb', line 17 def initialize(phase_id, table_list) @phase_id = phase_id @entries = [] table_list.each do |hash| @edition_id ||= hash['n_EditionID'] @entries << TableEntry.new(hash) end self end |
Instance Attribute Details
#edition_id ⇒ Object
Returns the value of attribute edition_id.
5 6 7 |
# File 'lib/infostrada/table.rb', line 5 def edition_id @edition_id end |
#entries ⇒ Object
Returns the value of attribute entries.
5 6 7 |
# File 'lib/infostrada/table.rb', line 5 def entries @entries end |
#phase_id ⇒ Object
Returns the value of attribute phase_id.
5 6 7 |
# File 'lib/infostrada/table.rb', line 5 def phase_id @phase_id end |
Class Method Details
Instance Method Details
#each(&block) ⇒ Object
29 30 31 |
# File 'lib/infostrada/table.rb', line 29 def each(&block) @entries.each(&block) end |