Class: RunLengthEncodingRb::RLEElement
- Inherits:
-
Object
- Object
- RunLengthEncodingRb::RLEElement
- Defined in:
- lib/run_length_encoding_rb/rle_element.rb
Overview
Stores an run-length encoded element.
Instance Attribute Summary collapse
-
#chunk ⇒ Object
Returns the value of attribute chunk.
-
#run_length ⇒ Object
Returns the value of attribute run_length.
Instance Method Summary collapse
-
#initialize(chunk:, run_length:) ⇒ RLEElement
constructor
A new instance of RLEElement.
Constructor Details
#initialize(chunk:, run_length:) ⇒ RLEElement
Returns a new instance of RLEElement.
10 11 12 13 |
# File 'lib/run_length_encoding_rb/rle_element.rb', line 10 def initialize(chunk:, run_length:) @chunk = chunk @run_length = run_length end |
Instance Attribute Details
#chunk ⇒ Object
Returns the value of attribute chunk.
8 9 10 |
# File 'lib/run_length_encoding_rb/rle_element.rb', line 8 def chunk @chunk end |
#run_length ⇒ Object
Returns the value of attribute run_length.
8 9 10 |
# File 'lib/run_length_encoding_rb/rle_element.rb', line 8 def run_length @run_length end |