Class: GeoClue::Config
- Inherits:
-
Object
- Object
- GeoClue::Config
- Defined in:
- lib/geoclue/config.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#skip_cache ⇒ Object
Returns the value of attribute skip_cache.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #evaluate(&block) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #inspect ⇒ Object
Constructor Details
#initialize ⇒ Config
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
#format ⇒ Object
Returns the value of attribute format.
3 4 5 |
# File 'lib/geoclue/config.rb', line 3 def format @format end |
#skip_cache ⇒ Object
Returns the value of attribute skip_cache.
3 4 5 |
# File 'lib/geoclue/config.rb', line 3 def skip_cache @skip_cache end |
#timeout ⇒ Object
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 |
#inspect ⇒ Object
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 |