Class: Plutonium::UI::Table::Resource
- Inherits:
-
Component::Base
- Object
- Component::Base
- Plutonium::UI::Table::Resource
- Defined in:
- lib/plutonium/ui/table/resource.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#resource_definition ⇒ Object
readonly
Returns the value of attribute resource_definition.
-
#resource_fields ⇒ Object
readonly
Returns the value of attribute resource_fields.
Instance Method Summary collapse
-
#initialize(collection, resource_fields:, resource_definition:) ⇒ Resource
constructor
A new instance of Resource.
- #view_template ⇒ Object
Methods included from Component::Behaviour
Methods included from Component::Tokens
Methods included from Component::Kit
#BuildActionButton, #BuildBlock, #BuildBreadcrumbs, #BuildColorModeSelector, #BuildDynaFrameContent, #BuildDynaFrameHost, #BuildEmptyCard, #BuildFrameNavigatorPanel, #BuildPageHeader, #BuildPanel, #BuildSkeletonTable, #BuildTabList, #BuildTableInfo, #BuildTablePagination, #BuildTableScopesBar, #BuildTableSearchBar, #method_missing, #respond_to_missing?
Constructor Details
#initialize(collection, resource_fields:, resource_definition:) ⇒ Resource
Returns a new instance of Resource.
9 10 11 12 13 |
# File 'lib/plutonium/ui/table/resource.rb', line 9 def initialize(collection, resource_fields:, resource_definition:) @collection = collection @resource_fields = resource_fields @resource_definition = resource_definition end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Plutonium::UI::Component::Kit
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
7 8 9 |
# File 'lib/plutonium/ui/table/resource.rb', line 7 def collection @collection end |
#resource_definition ⇒ Object (readonly)
Returns the value of attribute resource_definition.
7 8 9 |
# File 'lib/plutonium/ui/table/resource.rb', line 7 def resource_definition @resource_definition end |
#resource_fields ⇒ Object (readonly)
Returns the value of attribute resource_fields.
7 8 9 |
# File 'lib/plutonium/ui/table/resource.rb', line 7 def resource_fields @resource_fields end |
Instance Method Details
#view_template ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/plutonium/ui/table/resource.rb', line 15 def view_template collection.empty? ? render_empty_card : render_table end |