Class: OpenTopo::Net::Params::CatalogParams
- Inherits:
-
BaseParams
- Object
- BaseParams
- OpenTopo::Net::Params::CatalogParams
- Defined in:
- lib/open_topo/net/params/catalog_params.rb
Instance Attribute Summary collapse
-
#east ⇒ Object
readonly
Returns the value of attribute east.
-
#north ⇒ Object
readonly
Returns the value of attribute north.
-
#polygon ⇒ Object
readonly
Returns the value of attribute polygon.
-
#south ⇒ Object
readonly
Returns the value of attribute south.
-
#west ⇒ Object
readonly
Returns the value of attribute west.
Instance Method Summary collapse
-
#initialize(west: nil, south: nil, east: nil, north: nil, polygon: nil) ⇒ CatalogParams
constructor
A new instance of CatalogParams.
- #to_params ⇒ Object
Methods inherited from BaseParams
#error_messages, #valid?, #validate!, validate_with
Constructor Details
#initialize(west: nil, south: nil, east: nil, north: nil, polygon: nil) ⇒ CatalogParams
Returns a new instance of CatalogParams.
11 12 13 14 15 16 17 18 19 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 11 def initialize(west: nil, south: nil, east: nil, north: nil, polygon: nil) @west = west @south = south @east = east @north = north @polygon = polygon super() end |
Instance Attribute Details
#east ⇒ Object (readonly)
Returns the value of attribute east.
9 10 11 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 9 def east @east end |
#north ⇒ Object (readonly)
Returns the value of attribute north.
9 10 11 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 9 def north @north end |
#polygon ⇒ Object (readonly)
Returns the value of attribute polygon.
9 10 11 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 9 def polygon @polygon end |
#south ⇒ Object (readonly)
Returns the value of attribute south.
9 10 11 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 9 def south @south end |
#west ⇒ Object (readonly)
Returns the value of attribute west.
9 10 11 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 9 def west @west end |
Instance Method Details
#to_params ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/open_topo/net/params/catalog_params.rb', line 21 def to_params params = default_params if polygon params[:polygon] = polygon else params[:maxx] = east params[:minx] = west params[:maxy] = north params[:miny] = south end params end |