examples/ruby/route_guide/route_guide_server.rb
# each yields the features in the instances feature_db that lie within the
# instance rectangle.
each yields the features in the instances feature_db that lie within the
instance rectangle.
each yields the features in the instances feature_db that lie within the instance rectangle .
def each
    return enum_for(:each) unless block_given?
    @feature_db.each_pair do |location, name|
      next unless in?(location)
      next if name.nil? || name == ''
      pt = Point.new(
        Hash[location.each_pair.map { |k, v| [k.to_sym, v] }])
      yield Feature.new(location: pt, name: name)
    end
  end
def each return enum_for ( :each ) unless block_given? @feature_db . each_pair do | location , name | next unless in? ( location ) next if name . nil? || name == '' pt = Point . new ( Hash [ location . each_pair . map { | k , v | [ k . to_sym , v ] } ] ) yield Feature . new ( location : pt , name : name ) end end
each yields the features in the instances feature_db that lie within the
instance rectangle.
each yields the features in the instances feature_db that lie within the instance rectangle .