Class: StayAwake::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/stay_awake/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
# File 'lib/stay_awake/configuration.rb', line 12

def initialize
  @request_method = :head
  @interval = 5*60
  @logger = Logger.new(STDOUT)
  @logger.progname = :stay_awake
  @strategy = StayAwake.strategies
end

Instance Attribute Details

#app_nameObject

Returns the value of attribute app_name.



5
6
7
# File 'lib/stay_awake/configuration.rb', line 5

def app_name
  @app_name
end

#intervalObject

Returns the value of attribute interval.



8
9
10
# File 'lib/stay_awake/configuration.rb', line 8

def interval
  @interval
end

#loggerObject

Returns the value of attribute logger.



9
10
11
# File 'lib/stay_awake/configuration.rb', line 9

def logger
  @logger
end

#request_methodObject

Returns the value of attribute request_method.



7
8
9
# File 'lib/stay_awake/configuration.rb', line 7

def request_method
  @request_method
end

#strategyObject

Returns the value of attribute strategy.



10
11
12
# File 'lib/stay_awake/configuration.rb', line 10

def strategy
  @strategy
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/stay_awake/configuration.rb', line 6

def url
  @url
end