Class: Snaptoken::DiffTransformers::FoldSections::Section
- Inherits:
-
Object
- Object
- Snaptoken::DiffTransformers::FoldSections::Section
- Defined in:
- lib/snaptoken/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.
74 75 76 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 74 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.
72 73 74 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 72 def dirty @dirty end |
#end_line ⇒ Object
Returns the value of attribute end_line.
72 73 74 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 72 def end_line @end_line end |
#level ⇒ Object
Returns the value of attribute level.
72 73 74 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 72 def level @level end |
#start_line ⇒ Object
Returns the value of attribute start_line.
72 73 74 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 72 def start_line @start_line end |
Instance Method Details
#dirty! ⇒ Object
83 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 83 def dirty!; @dirty = true; end |
#dirty? ⇒ Boolean
82 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 82 def dirty?; @dirty; end |
#to_range ⇒ Object
78 79 80 |
# File 'lib/snaptoken/diff_transformers/fold_sections.rb', line 78 def to_range start_line..end_line end |