Class: GeoClue::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/geoclue/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
8
# File 'lib/geoclue/config.rb', line 5

def initialize
  self.timeout = 10
  self.skip_cache = false
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



3
4
5
# File 'lib/geoclue/config.rb', line 3

def format
  @format
end

#skip_cacheObject

Returns the value of attribute skip_cache.



3
4
5
# File 'lib/geoclue/config.rb', line 3

def skip_cache
  @skip_cache
end

#timeoutObject

Returns the value of attribute timeout.



3
4
5
# File 'lib/geoclue/config.rb', line 3

def timeout
  @timeout
end

Instance Method Details

#evaluate(&block) ⇒ Object



10
11
12
13
# File 'lib/geoclue/config.rb', line 10

def evaluate(&block)
  return unless block_given?
  instance_eval(&block)
end

#inspectObject



15
16
17
18
19
# File 'lib/geoclue/config.rb', line 15

def inspect
  %i[timeout format skip_cache].each.map do |var|
    "#{var}: #{send(var).inspect}"
  end.join("\n")
end