Class: RapidDiffs::AppComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- RapidDiffs::AppComponent
- Defined in:
- app/components/rapid_diffs/app_component.rb
Instance Attribute Summary collapse
-
#presenter ⇒ Object
readonly
Returns the value of attribute presenter.
Instance Method Summary collapse
- #diff_collection ⇒ Object
-
#initialize(presenter, extra_app_data: nil, extra_prefetch_endpoints: []) ⇒ AppComponent
constructor
A new instance of AppComponent.
Constructor Details
#initialize(presenter, extra_app_data: nil, extra_prefetch_endpoints: []) ⇒ AppComponent
Returns a new instance of AppComponent.
16 17 18 19 20 |
# File 'app/components/rapid_diffs/app_component.rb', line 16 def initialize(presenter, extra_app_data: nil, extra_prefetch_endpoints: []) @presenter = presenter @extra_app_data = extra_app_data @extra_prefetch_endpoints = extra_prefetch_endpoints end |
Instance Attribute Details
#presenter ⇒ Object (readonly)
Returns the value of attribute presenter.
9 10 11 |
# File 'app/components/rapid_diffs/app_component.rb', line 9 def presenter @presenter end |
Instance Method Details
#diff_collection ⇒ Object
22 23 24 25 26 |
# File 'app/components/rapid_diffs/app_component.rb', line 22 def diff_collection return [linked_file] if linked_file diffs_slice || [] end |