Class: Row
- Inherits:
-
Object
- Object
- Row
- Defined in:
- lib/asker/data/row.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#langs ⇒ Object
readonly
Returns the value of attribute langs.
-
#raws ⇒ Object
readonly
Returns the value of attribute raws.
-
#simple ⇒ Object
readonly
Returns the value of attribute simple.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize(table, index, xml_data) ⇒ Row
constructor
A new instance of Row.
- #simple_off(option) ⇒ Object
Constructor Details
#initialize(table, index, xml_data) ⇒ Row
Returns a new instance of Row.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/asker/data/row.rb', line 9 def initialize( table, index, xml_data ) @table = table @index = index @id = @table.id + "." + @index.to_s @langs = @table.langs @types = @table.types @raws = [] @columns = [] @simple = { :lang => true, :type => true } read_data_from_xml(xml_data) end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
6 7 8 |
# File 'lib/asker/data/row.rb', line 6 def columns @columns end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/asker/data/row.rb', line 5 def id @id end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
5 6 7 |
# File 'lib/asker/data/row.rb', line 5 def index @index end |
#langs ⇒ Object (readonly)
Returns the value of attribute langs.
6 7 8 |
# File 'lib/asker/data/row.rb', line 6 def langs @langs end |
#raws ⇒ Object (readonly)
Returns the value of attribute raws.
6 7 8 |
# File 'lib/asker/data/row.rb', line 6 def raws @raws end |
#simple ⇒ Object (readonly)
Returns the value of attribute simple.
7 8 9 |
# File 'lib/asker/data/row.rb', line 7 def simple @simple end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
5 6 7 |
# File 'lib/asker/data/row.rb', line 5 def table @table end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
6 7 8 |
# File 'lib/asker/data/row.rb', line 6 def types @types end |
Instance Method Details
#simple_off(option) ⇒ Object
21 22 23 24 |
# File 'lib/asker/data/row.rb', line 21 def simple_off(option) @simple[option]=false @table.simple_off(option) end |