Sha256: 7ce96f34d9994ace0f054271800e8c786ecf402aca02b841134f8cd5e73ae36d

Contents?: true

Size: 614 Bytes

Versions: 66

Compression:

Stored size: 614 Bytes

Contents

module Avo
  class BaseResourceTool
    prepend Avo::Concerns::IsResourceItem

    include Avo::Concerns::HasItemType
    include Avo::Concerns::IsVisible
    include Avo::Concerns::VisibleInDifferentViews

    class_attribute :name
    class_attribute :partial

    attr_accessor :params

    def initialize(**args)
      # Set the visibility
      only_on Avo.configuration.resource_default_view

      @args = args

      post_initialize if respond_to?(:post_initialize)
    end

    def partial
      return self.class.partial if self.class.partial.present?

      self.class.to_s.underscore
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
avo-3.3.2 lib/avo/base_resource_tool.rb
avo-3.3.1 lib/avo/base_resource_tool.rb
avo-3.3.0 lib/avo/base_resource_tool.rb
avo-3.2.3 lib/avo/base_resource_tool.rb
avo-3.0.1.beta23 lib/avo/base_resource_tool.rb
avo-3.0.1.beta20 lib/avo/base_resource_tool.rb
avo-3.0.1.beta21 lib/avo/base_resource_tool.rb
avo-3.0.1.beta17 lib/avo/base_resource_tool.rb
avo-3.0.1.beta22 lib/avo/base_resource_tool.rb
avo-3.0.1.beta18 lib/avo/base_resource_tool.rb
avo-3.0.1.beta19 lib/avo/base_resource_tool.rb
avo-3.0.1.beta24 lib/avo/base_resource_tool.rb
avo-3.0.1.beta15 lib/avo/base_resource_tool.rb
avo-3.0.1.beta16 lib/avo/base_resource_tool.rb
avo-3.0.1.beta14 lib/avo/base_resource_tool.rb
avo-3.0.1.beta12 lib/avo/base_resource_tool.rb
avo-3.0.1.beta13 lib/avo/base_resource_tool.rb
avo-3.0.1.beta10 lib/avo/base_resource_tool.rb
avo-3.0.1.beta11 lib/avo/base_resource_tool.rb
avo-3.0.0.pre19 lib/avo/base_resource_tool.rb