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.
-
#min_height ⇒ Object
readonly
Returns the value of attribute min_height.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #each(&block) ⇒ Object
- #hash ⇒ Object
-
#initialize(cells, min_height: 0.0) ⇒ Row
constructor
A new instance of Row.
- #length ⇒ Object
Constructor Details
#initialize(cells, min_height: 0.0) ⇒ Row
Returns a new instance of Row.
65 66 67 68 69 |
# File 'lib/arrolio/content/table.rb', line 65 def initialize(cells, min_height: 0.0) @cells = Array(cells).freeze @min_height = min_height.to_f.freeze freeze end |
Instance Attribute Details
#cells ⇒ Object (readonly)
Returns the value of attribute cells.
63 64 65 |
# File 'lib/arrolio/content/table.rb', line 63 def cells @cells end |
#min_height ⇒ Object (readonly)
Returns the value of attribute min_height.
63 64 65 |
# File 'lib/arrolio/content/table.rb', line 63 def min_height @min_height end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
79 80 81 82 |
# File 'lib/arrolio/content/table.rb', line 79 def ==(other) other.is_a?(self.class) && cells == other.cells && min_height == other.min_height end |
#each(&block) ⇒ Object
71 72 73 |
# File 'lib/arrolio/content/table.rb', line 71 def each(&block) @cells.each(&block) end |
#hash ⇒ Object
86 87 88 |
# File 'lib/arrolio/content/table.rb', line 86 def hash [self.class, cells, min_height].hash end |
#length ⇒ Object
75 76 77 |
# File 'lib/arrolio/content/table.rb', line 75 def length @cells.length end |