Class: MapFlightExRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/FlightXML2REST.rb

Overview

MapFlightEx

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(airports_expand_view = nil, faFlightID = nil, latlon_box = [], layer_off = [], layer_on = [], mapHeight = nil, mapWidth = nil, show_airports = nil, show_data_blocks = nil) ⇒ MapFlightExRequest

Returns a new instance of MapFlightExRequest.



1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
# File 'lib/FlightXML2REST.rb', line 1640

def initialize(airports_expand_view = nil, 
               faFlightID = nil, 
               latlon_box = [], 
               layer_off = [], 
               layer_on = [], 
               mapHeight = nil, 
               mapWidth = nil, 
               show_airports = nil, 
               show_data_blocks = nil)
  @airports_expand_view = airports_expand_view
  @faFlightID = faFlightID
  @latlon_box = latlon_box
  @layer_off = layer_off
  @layer_on = layer_on
  @mapHeight = mapHeight
  @mapWidth = mapWidth
  @show_airports = show_airports
  @show_data_blocks = show_data_blocks
end

Instance Attribute Details

#airports_expand_viewObject

Returns the value of attribute airports_expand_view.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def airports_expand_view
  @airports_expand_view
end

#faFlightIDObject

Returns the value of attribute faFlightID.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def faFlightID
  @faFlightID
end

#latlon_boxObject

Returns the value of attribute latlon_box.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def latlon_box
  @latlon_box
end

#layer_offObject

Returns the value of attribute layer_off.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def layer_off
  @layer_off
end

#layer_onObject

Returns the value of attribute layer_on.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def layer_on
  @layer_on
end

#mapHeightObject

Returns the value of attribute mapHeight.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def mapHeight
  @mapHeight
end

#mapWidthObject

Returns the value of attribute mapWidth.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def mapWidth
  @mapWidth
end

#show_airportsObject

Returns the value of attribute show_airports.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def show_airports
  @show_airports
end

#show_data_blocksObject

Returns the value of attribute show_data_blocks.



1630
1631
1632
# File 'lib/FlightXML2REST.rb', line 1630

def show_data_blocks
  @show_data_blocks
end

Instance Method Details

#postObject



1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
# File 'lib/FlightXML2REST.rb', line 1659

def post
  #TODO Clean this up when the Rest-Client properly handles arrays
  latlon_box = ""
  @latlon_box.each { |v| latlon_box = latlon_box + "latlon_box=" + v.to_s + "&" }
  @latlon_box = latlon_box
  
  layer_on = ""
  @layer_on.each { |v| layer_on = layer_on + "layer_on=" + v.to_s + "&" }
  @layer_on = layer_on
  
  layer_off = ""
  @layer_off.each { |v| layer_off = layer_off + "layer_off=" + v.to_s + "&" }
  @layer_off = layer_off
  
  output = "airports_expand_view=#@airports_expand_view&faFlightID=#@faFlightID&#{@latlon_box}#{@layer_off}#{@layer_on}" +
  "mapHeight=#@mapHeight&mapWidth=#@mapWidth&show_airports=#@show_airports&show_data_blocks=#@show_data_blocks"
  output
end