Module: Silva::System
- Defined in:
- lib/silva/system.rb,
lib/silva/system/en.rb,
lib/silva/system/base.rb,
lib/silva/system/osen.rb,
lib/silva/system/wgs84.rb,
lib/silva/system/osgb36.rb,
lib/silva/system/gridref.rb,
lib/silva/system/co_ordinate.rb
Overview
A location system – :wgs84, :osgb36, :en or :gridref.
Defined Under Namespace
Modules: CoOrdinate, OsEn Classes: Base, En, Gridref, Osgb36, Wgs84
Class Method Summary collapse
-
.create(system_name, options) ⇒ Silva::System
A factory method to simplify and moderate creation of location systems.
Class Method Details
.create(system_name, options) ⇒ Silva::System
A factory method to simplify and moderate creation of location systems.
16 17 18 19 20 21 |
# File 'lib/silva/system.rb', line 16 def self.create(system_name, ) system = Silva::System.const_get(system_name.to_s.capitalize) system.new() rescue NameError raise Silva::InvalidSystemError, "Can't create system: #{system_name}" end |