Module: PhilLocator
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/phil_locator.rb,
lib/phil_locator/engine.rb,
lib/phil_locator/version.rb,
app/models/phil_locator/city.rb,
lib/phil_locator/gem_version.rb,
app/models/phil_locator/region.rb,
lib/phil_locator/configuration.rb,
app/models/phil_locator/barangay.rb,
app/models/phil_locator/district.rb,
app/models/phil_locator/province.rb,
app/models/phil_locator/island_group.rb,
app/models/phil_locator/municipality.rb,
app/models/phil_locator/sub_municipality.rb
Defined Under Namespace
Modules: VERSION
Classes: Barangay, City, Configuration, District, Engine, IslandGroup, Municipality, Province, Region, SubMunicipality
Class Method Summary
collapse
Class Method Details
15
16
17
|
# File 'lib/phil_locator.rb', line 15
def self.configure
yield configuration if block_given?
end
|
.data_root_path(path = "") ⇒ Object
19
20
21
22
23
|
# File 'lib/phil_locator.rb', line 19
def self.data_root_path(path = "")
raise "`#{name}.data_root_path` MUST be a String object." unless configuration.data_root_path.is_a?(String)
[configuration.data_root_path, path.to_s].join("/")
end
|
.gem_full_path ⇒ Object
25
26
27
|
# File 'lib/phil_locator.rb', line 25
def self.gem_full_path
Gem.loaded_specs[gem_name].full_gem_path
end
|
.gem_name ⇒ Object
29
30
31
|
# File 'lib/phil_locator.rb', line 29
def self.gem_name
name.underscore
end
|
.gem_version ⇒ Object
2
3
4
|
# File 'lib/phil_locator/gem_version.rb', line 2
def self.gem_version
Gem::Version.new VERSION::STRING
end
|
.version ⇒ Object
4
5
6
|
# File 'lib/phil_locator/version.rb', line 4
def self.version
gem_version
end
|