Class: Geoq::Commands::GeoHash::Point

Inherits:
Base
  • Object
show all
Defined in:
lib/geoq/commands/geohash.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #global_opts, #instream, #opts

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Geoq::Commands::Base

Instance Method Details

#levelObject



5
6
7
# File 'lib/geoq/commands/geohash.rb', line 5

def level
  args.first.to_i
end

#outputObject



9
10
11
12
13
14
15
# File 'lib/geoq/commands/geohash.rb', line 9

def output
  Enumerator.new do |e|
    instream.each do |entity|
      e << entity.gh_string(level)
    end
  end
end