Class: Avo::Dashboards::BaseDivider
- Inherits:
-
Object
- Object
- Avo::Dashboards::BaseDivider
- Includes:
- Concerns::VisibleInDashboard
- Defined in:
- lib/avo/dashboards/base_divider.rb
Instance Attribute Summary collapse
-
#dashboard ⇒ Object
readonly
Returns the value of attribute dashboard.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#invisible ⇒ Object
readonly
Returns the value of attribute invisible.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#visible ⇒ Object
readonly
Returns the value of attribute visible.
Instance Method Summary collapse
- #call_block ⇒ Object
-
#initialize(dashboard: nil, label: nil, invisible: false, index: nil, visible: nil) ⇒ BaseDivider
constructor
A new instance of BaseDivider.
- #is_card? ⇒ Boolean
- #is_divider? ⇒ Boolean
Methods included from Concerns::VisibleInDashboard
Constructor Details
#initialize(dashboard: nil, label: nil, invisible: false, index: nil, visible: nil) ⇒ BaseDivider
Returns a new instance of BaseDivider.
14 15 16 17 18 19 20 |
# File 'lib/avo/dashboards/base_divider.rb', line 14 def initialize(dashboard: nil, label: nil, invisible: false, index: nil, visible: nil) @dashboard = dashboard @label = label @invisible = invisible @index = index @visible = visible end |
Instance Attribute Details
#dashboard ⇒ Object (readonly)
Returns the value of attribute dashboard.
6 7 8 |
# File 'lib/avo/dashboards/base_divider.rb', line 6 def dashboard @dashboard end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
9 10 11 |
# File 'lib/avo/dashboards/base_divider.rb', line 9 def index @index end |
#invisible ⇒ Object (readonly)
Returns the value of attribute invisible.
8 9 10 |
# File 'lib/avo/dashboards/base_divider.rb', line 8 def invisible @invisible end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
7 8 9 |
# File 'lib/avo/dashboards/base_divider.rb', line 7 def label @label end |
#visible ⇒ Object (readonly)
Returns the value of attribute visible.
10 11 12 |
# File 'lib/avo/dashboards/base_divider.rb', line 10 def visible @visible end |
Instance Method Details
#call_block ⇒ Object
30 31 32 |
# File 'lib/avo/dashboards/base_divider.rb', line 30 def call_block ::Avo::Hosts::CardVisibility.new(block: visible, card: self, parent: dashboard).handle end |
#is_card? ⇒ Boolean
26 27 28 |
# File 'lib/avo/dashboards/base_divider.rb', line 26 def is_card? false end |
#is_divider? ⇒ Boolean
22 23 24 |
# File 'lib/avo/dashboards/base_divider.rb', line 22 def is_divider? true end |