Class: Arrolio::Content::Table::Row
- Inherits:
-
Object
- Object
- Arrolio::Content::Table::Row
- Includes:
- Enumerable
- Defined in:
- lib/arrolio/content/table.rb
Instance Attribute Summary collapse
-
#cells ⇒ Object
readonly
Returns the value of attribute cells.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #each(&block) ⇒ Object
- #hash ⇒ Object
-
#initialize(cells) ⇒ Row
constructor
A new instance of Row.
- #length ⇒ Object
Constructor Details
#initialize(cells) ⇒ Row
Returns a new instance of Row.
58 59 60 61 |
# File 'lib/arrolio/content/table.rb', line 58 def initialize(cells) @cells = Array(cells).freeze freeze end |
Instance Attribute Details
#cells ⇒ Object (readonly)
Returns the value of attribute cells.
56 57 58 |
# File 'lib/arrolio/content/table.rb', line 56 def cells @cells end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
71 72 73 |
# File 'lib/arrolio/content/table.rb', line 71 def ==(other) other.is_a?(self.class) && cells == other.cells end |
#each(&block) ⇒ Object
63 64 65 |
# File 'lib/arrolio/content/table.rb', line 63 def each(&block) @cells.each(&block) end |
#hash ⇒ Object
77 78 79 |
# File 'lib/arrolio/content/table.rb', line 77 def hash [self.class, cells].hash end |
#length ⇒ Object
67 68 69 |
# File 'lib/arrolio/content/table.rb', line 67 def length @cells.length end |