Module: Moon::Activatable

Included in:
Cursor2, Scheduler, Scheduler::Jobs::Base
Defined in:
lib/moon/packages/std/mixins/activatable.rb

Overview

Mixin for marking objects as active, as to what active means, depends on the object.

Instance Method Summary collapse

Instance Method Details

#activateself

Sets active to true

Returns:

  • (self)

8
9
10
11
# File 'lib/moon/packages/std/mixins/activatable.rb', line 8

def activate
  self.active = true
  self
end

#active?Boolean

Returns:


21
22
23
# File 'lib/moon/packages/std/mixins/activatable.rb', line 21

def active?
  !!active
end

#deactivateself

Sets active to false

Returns:

  • (self)

16
17
18
19
# File 'lib/moon/packages/std/mixins/activatable.rb', line 16

def deactivate
  self.active = false
  self
end