Class: Blacklight::Component
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Blacklight::Component
- Defined in:
- lib/blacklight/component.rb
Direct Known Subclasses
ConstraintComponent, ConstraintLayoutComponent, ConstraintsComponent, Document::ActionComponent, Document::ActionsComponent, Document::CitationComponent, Document::GroupComponent, Document::MoreLikeThisComponent, Document::PageHeaderComponent, Document::ShowToolsComponent, Document::SidebarComponent, Document::ThumbnailComponent, DocumentComponent, DocumentMetadataComponent, DocumentTitleComponent, FacetFieldCheckboxesComponent, FacetFieldComponent, FacetFieldFilterComponent, FacetFieldInclusiveConstraintComponent, FacetFieldListComponent, FacetFieldNoLayoutComponent, FacetFieldPaginationComponent, FacetItemComponent, FacetItemPivotComponent, HeaderComponent, HiddenSearchStateComponent, MetadataFieldComponent, MetadataFieldLayoutComponent, Response::FacetGroupComponent, Response::PaginationComponent, Response::SortComponent, Response::SpellcheckComponent, Response::ViewTypeButtonComponent, Response::ViewTypeComponent, Search::PerPageComponent, Search::SidebarComponent, SearchBarComponent, SearchButtonComponent, SearchContext::ServerAppliedParamsComponent, SearchContext::ServerItemPaginationComponent, SearchHeaderComponent, SearchNavbarComponent, SkipLinkComponent, StartOverButtonComponent, System::DropdownButtonComponent, System::DropdownComponent, System::FlashMessageComponent, System::ModalComponent, TopNavbarComponent
Defined Under Namespace
Classes: EngineCompiler
Constant Summary collapse
- EXCLUDE_VARIABLES =
[ :@lookup_context, :@view_renderer, :@view_flow, :@view_context, :@tag_builder, :@current_template, :@__vc_set_slots, :@__vc_original_view_context, :@__vc_variant, :@__vc_content_evaluated, :@__vc_render_in_block, :@__vc_content, :@__vc_helpers ].freeze
Class Method Summary collapse
-
.compiler ⇒ Object
rubocop:disable Naming/MemoizedInstanceVariableName.
-
.config ⇒ Object
Workaround for github.com/ViewComponent/view_component/issues/1565.
Instance Method Summary collapse
Class Method Details
.compiler ⇒ Object
rubocop:disable Naming/MemoizedInstanceVariableName
12 13 14 |
# File 'lib/blacklight/component.rb', line 12 def compiler @__vc_compiler ||= EngineCompiler.new(self) end |
.config ⇒ Object
Workaround for github.com/ViewComponent/view_component/issues/1565
7 8 9 |
# File 'lib/blacklight/component.rb', line 7 def config @config ||= ViewComponent::Config.defaults.merge(ViewComponent::Base.config) end |
Instance Method Details
#inspect ⇒ Object
28 29 30 31 32 33 |
# File 'lib/blacklight/component.rb', line 28 def inspect # Exclude variables added by render_in render_variables = instance_variables - EXCLUDE_VARIABLES fields = render_variables.map { |ivar| "#{ivar}:#{instance_variable_get(ivar).inspect}" }.join(', ') "#<#{self.class.name}:#{object_id} #{fields}>" end |