Class: Leg::DiffTransformers::FoldSections::Section
- Inherits:
-
Object
- Object
- Leg::DiffTransformers::FoldSections::Section
- Defined in:
- lib/leg/diff_transformers/fold_sections.rb
Instance Attribute Summary collapse
-
#dirty ⇒ Object
Returns the value of attribute dirty.
-
#end_line ⇒ Object
Returns the value of attribute end_line.
-
#level ⇒ Object
Returns the value of attribute level.
-
#start_line ⇒ Object
Returns the value of attribute start_line.
Instance Method Summary collapse
- #dirty! ⇒ Object
- #dirty? ⇒ Boolean
-
#initialize(level, start_line, end_line = nil, dirty = false) ⇒ Section
constructor
A new instance of Section.
- #to_range ⇒ Object
Constructor Details
#initialize(level, start_line, end_line = nil, dirty = false) ⇒ Section
Returns a new instance of Section.
76 77 78 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 76 def initialize(level, start_line, end_line = nil, dirty = false) @level, @start_line, @end_line, @dirty = level, start_line, end_line, dirty end |
Instance Attribute Details
#dirty ⇒ Object
Returns the value of attribute dirty.
74 75 76 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 74 def dirty @dirty end |
#end_line ⇒ Object
Returns the value of attribute end_line.
74 75 76 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 74 def end_line @end_line end |
#level ⇒ Object
Returns the value of attribute level.
74 75 76 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 74 def level @level end |
#start_line ⇒ Object
Returns the value of attribute start_line.
74 75 76 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 74 def start_line @start_line end |
Instance Method Details
#dirty! ⇒ Object
85 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 85 def dirty!; @dirty = true; end |
#dirty? ⇒ Boolean
84 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 84 def dirty?; @dirty; end |
#to_range ⇒ Object
80 81 82 |
# File 'lib/leg/diff_transformers/fold_sections.rb', line 80 def to_range start_line..end_line end |