Class: RapidDiffs::Viewers::Text::LineContentComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- RapidDiffs::Viewers::Text::LineContentComponent
- Defined in:
- app/components/rapid_diffs/viewers/text/line_content_component.rb
Instance Method Summary collapse
- #change_type ⇒ Object
-
#initialize(line:, position:) ⇒ LineContentComponent
constructor
A new instance of LineContentComponent.
Constructor Details
#initialize(line:, position:) ⇒ LineContentComponent
Returns a new instance of LineContentComponent.
7 8 9 10 |
# File 'app/components/rapid_diffs/viewers/text/line_content_component.rb', line 7 def initialize(line:, position:) @line = line @position = position end |
Instance Method Details
#change_type ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/components/rapid_diffs/viewers/text/line_content_component.rb', line 12 def change_type return unless @line return 'meta' if @line. return 'added' if @line.added? 'removed' if @line.removed? end |