Sha256: b530b5cd0a64a722f596e4b513789df04efe13dad856813d4852e13dd6151f7a

Contents?: true

Size: 738 Bytes

Versions: 7

Compression:

Stored size: 738 Bytes

Contents

module Avo
  module Dashboards
    class BaseDivider
      include Avo::Concerns::VisibleInDashboard

      attr_reader :dashboard
      attr_reader :label
      attr_reader :invisible
      attr_reader :index
      attr_reader :visible

      class_attribute :id

      def initialize(dashboard: nil, label: nil, invisible: false, index: nil, visible: nil)
        @dashboard = dashboard
        @label = label
        @invisible = invisible
        @index = index
        @visible = visible
      end

      def is_divider?
        true
      end

      def is_card?
        false
      end

      def call_block
        ::Avo::Hosts::CardVisibility.new(block: visible, card: self, parent: dashboard).handle
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
avo-2.29.1.pre.pr1652 lib/avo/dashboards/base_divider.rb
avo-2.29.0 lib/avo/dashboards/base_divider.rb
avo-2.28.3.pre.pr1646 lib/avo/dashboards/base_divider.rb
avo-2.28.2.pre.pr1642 lib/avo/dashboards/base_divider.rb
avo-2.28.1.pre.pr1642 lib/avo/dashboards/base_divider.rb
avo-2.28.0 lib/avo/dashboards/base_divider.rb
avo-2.27.2.pre.pr1606 lib/avo/dashboards/base_divider.rb