Class: Andromeda::Guides::DefaultGuide

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Singleton
Defined in:
lib/andromeda/sugar.rb

Instance Method Summary collapse

Constructor Details

#initializeDefaultGuide

Returns a new instance of DefaultGuide.



19
20
21
# File 'lib/andromeda/sugar.rb', line 19

def initialize
  super LocalGuide.instance
end

Instance Method Details

#instance=(new_instance) ⇒ Object



23
24
25
26
27
28
# File 'lib/andromeda/sugar.rb', line 23

def instance=(new_instance)
  if new_instance.is_a?(Class) && new_instance.include?(Singleton)
    new_instance = new_instance.instance
  end
  instance.__setobj__ new_instance
end