Module: Pingity
- Extended by:
- ApiMethods
- Defined in:
- lib/pingity.rb
Defined Under Namespace
Modules: ApiMethods, Exceptions
Classes: Config
Constant Summary
collapse
- VERSION =
Constants ============================================================
File.read(File.expand_path(File.join('..', 'VERSION'), File.dirname(__FILE__))).chomp
- API_VERSION =
'1.0'.freeze
- API_VERSION_FOR_URI =
"v-#{API_VERSION.sub('.', '-')}".freeze
Class Method Summary
collapse
Methods included from ApiMethods
sample_push
Class Method Details
.api_method?(method) ⇒ Boolean
45
46
47
|
# File 'lib/pingity.rb', line 45
def self.api_method?(method)
ApiMethods.instance_methods.include?(method)
end
|
.api_version ⇒ Object
41
42
43
|
# File 'lib/pingity.rb', line 41
def self.api_version
API_VERSION
end
|
.config(options = nil) {|@config| ... } ⇒ Object
Also known as:
configure
Module Methods =======================================================
20
21
22
23
24
25
26
27
28
|
# File 'lib/pingity.rb', line 20
def self.config(options = nil)
@config = nil if (options)
@config ||= Pingity::Config.new(options)
yield(@config) if (block_given?)
@config
end
|
33
34
35
|
# File 'lib/pingity.rb', line 33
def self.configured?
self.config.valid?
end
|
.version ⇒ Object
37
38
39
|
# File 'lib/pingity.rb', line 37
def self.version
VERSION
end
|