Method: Stator::Alias#initialize

Defined in:
lib/stator/alias.rb

#initialize(machine, name, options = {}) ⇒ Alias

Returns a new instance of Alias.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/stator/alias.rb', line 4

def initialize(machine, name, options = {})
  @machine    = machine
  @name       = name
  @namespace  = @machine.namespace
  @full_name  = [@namespace, @name].compact.join('_')
  @states     = []
  @not        = false
  @opposite   = nil
  @constant   = options[:constant]
  @scope      = options[:scope]
end