Class: ToTown::CLI
- Inherits:
-
Thor
- Object
- Thor
- ToTown::CLI
- Defined in:
- lib/to_town/cli.rb
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/to_town/cli.rb', line 20 def check points = ToTown.check([:lat].to_f, [:lng].to_f, [:limit]) points.each do |point| puts %{ #{point.name} #{point.state}\t type: #{point.town_type}\t latitude: #{point.latlng[0]}\t longitude: #{point.latlng[1]}\t land area: #{point.aland}\t water area: #{point.awater} } end end |
#config(db_name = 'mongo') ⇒ Object
34 35 36 37 38 39 |
# File 'lib/to_town/cli.rb', line 34 def config(db_name='mongo') case db_name when "mongo" ToTown::Generators::Mongodb.start end end |