Sha256: 19afdd833054759676c137fe615c44c9a826d740d6dc76877bd78b549a93a02f

Contents?: true

Size: 347 Bytes

Versions: 128

Compression:

Stored size: 347 Bytes

Contents

# Adds the ability to set the visibility of an item in the execution context.
module Avo
  module Concerns
    module IsVisible
      attr_accessor :visible

      def visible?
        # Default to true
        return true if visible.nil?

        Avo::ExecutionContext.new(target: visible, resource: @resource).handle
      end
    end
  end
end

Version data entries

128 entries across 128 versions & 1 rubygems

Version Path
avo-3.1.0 lib/avo/concerns/is_visible.rb
avo-3.0.8 lib/avo/concerns/is_visible.rb
avo-3.0.7 lib/avo/concerns/is_visible.rb
avo-3.0.6 lib/avo/concerns/is_visible.rb
avo-3.0.5 lib/avo/concerns/is_visible.rb
avo-3.0.4 lib/avo/concerns/is_visible.rb
avo-3.0.3 lib/avo/concerns/is_visible.rb
avo-3.0.2 lib/avo/concerns/is_visible.rb