Module: Moon::RenderPrimitive::Visibility

Included in:
Moon::RenderContext
Defined in:
lib/moon/packages/render_primitives/visibility.rb

Overview

Visibility control

Instance Method Summary collapse

Instance Method Details

#hideself

Sets visible to false

Returns:

  • (self)

22
23
24
25
# File 'lib/moon/packages/render_primitives/visibility.rb', line 22

def hide
  @visible = false
  self
end

#invisible?Boolean

Is this invisible?

Returns:


15
16
17
# File 'lib/moon/packages/render_primitives/visibility.rb', line 15

def invisible?
  !@visible
end

#showself

Sets visible to true

Returns:

  • (self)

30
31
32
33
# File 'lib/moon/packages/render_primitives/visibility.rb', line 30

def show
  @visible = true
  self
end

#visible?Boolean

Is this visible?

Returns:


8
9
10
# File 'lib/moon/packages/render_primitives/visibility.rb', line 8

def visible?
  !!@visible
end