class GeoJSON::Coordinates::CoordinateTree::Branch

Overview

A CoordinateTree::Branch is an intermediate node in a CoordinateTree structure. It has children and a parent but no leaf value.

Defined in:

geojson/coordinates/coordinate_tree.cr

Constructors

Instance Method Summary

Instance methods inherited from class GeoJSON::Coordinates::CoordinateTree

leaf_value : Float64 leaf_value

Constructor methods inherited from class GeoJSON::Coordinates::CoordinateTree

new(parser : JSON::PullParser) new

Constructor Detail

def self.new(parent : CoordinateTree, parser : JSON::PullParser) #

Creates a new Branch as a child of parent based on parser. This constructor assumes that the parser is positioned at the beginning of an array in a GeoJSON coordinate string.


[View source]
def self.new(parent : CoordinateTree) #

Creates a new Branch with the given parent and adds the new Branch as a child of parent.


[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def each(*args, **options) #

Iterates over this Branch's children.


[View source]
def each(*args, **options, &) #

Iterates over this Branch's children.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def leaf_value : Float64 #

Raises an exception because a Branch does not have a leaf value.


[View source]