Class: SeeingIsBelieving::Binary::AlignChunk
- Inherits:
-
Object
- Object
- SeeingIsBelieving::Binary::AlignChunk
- Defined in:
- lib/seeing_is_believing/binary/align_chunk.rb
Instance Method Summary collapse
-
#initialize(body) ⇒ AlignChunk
constructor
A new instance of AlignChunk.
-
#line_length_for(line_number) ⇒ Object
max line length of the the chunk (newline separated sections of code exempting comments) + 2 spaces for padding.
Constructor Details
#initialize(body) ⇒ AlignChunk
Returns a new instance of AlignChunk.
6 7 8 |
# File 'lib/seeing_is_believing/binary/align_chunk.rb', line 6 def initialize(body) self.body = body end |
Instance Method Details
#line_length_for(line_number) ⇒ Object
max line length of the the chunk (newline separated sections of code exempting comments) + 2 spaces for padding
11 12 13 |
# File 'lib/seeing_is_believing/binary/align_chunk.rb', line 11 def line_length_for(line_number) line_lengths.fetch line_number, 0 end |