Class: Beacon::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/beacon/resources/service.rb

Constant Summary collapse

@@instance =
nil

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeService

Returns a new instance of Service.



15
16
17
18
# File 'lib/beacon/resources/service.rb', line 15

def initialize
  @log = Logger.new($stdout)
  @log.level = Logger::INFO
end

Class Method Details

.instanceObject



9
10
11
# File 'lib/beacon/resources/service.rb', line 9

def self.instance
  @@instance ||= new
end

Instance Method Details

#error(message) ⇒ Object



20
21
22
# File 'lib/beacon/resources/service.rb', line 20

def error(message)
  @log.error(message.capitalize)
end

#info(message) ⇒ Object



24
25
26
# File 'lib/beacon/resources/service.rb', line 24

def info(message)
  @log.info(message.capitalize)
end