Module: Ritsu::Utility::SingleInstance::ClassMethods

Defined in:
lib/ritsu/utility/single_instance.rb

Instance Method Summary collapse

Instance Method Details

#instanceObject



5
6
7
# File 'lib/ritsu/utility/single_instance.rb', line 5

def instance
  @instance ||= nil
end

#set_instance(instance) ⇒ Object



9
10
11
12
# File 'lib/ritsu/utility/single_instance.rb', line 9

def set_instance(instance)
  validate_instance(instance)
  @instance = instance
end

#validate_instance(instance) ⇒ Object



14
15
# File 'lib/ritsu/utility/single_instance.rb', line 14

def validate_instance(instance)
end