Module: Avo::Concerns::IsVisible

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#visibleObject

Returns the value of attribute visible.



5
6
7
# File 'lib/avo/concerns/is_visible.rb', line 5

def visible
  @visible
end

Instance Method Details

#visible?Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
# File 'lib/avo/concerns/is_visible.rb', line 7

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

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