Module: RubyPtvApi
- Defined in:
- lib/ruby_ptv_api.rb,
lib/ruby_ptv_api/base.rb,
lib/ruby_ptv_api/x_tour.rb,
lib/ruby_ptv_api/version.rb,
lib/ruby_ptv_api/constant.rb,
lib/ruby_ptv_api/id_manager.rb,
lib/ruby_ptv_api/model/base.rb,
lib/ruby_ptv_api/model/point.rb,
lib/ruby_ptv_api/model/plain_point.rb,
lib/ruby_ptv_api/model/x_route/klm.rb,
lib/ruby_ptv_api/model/x_tour/plan.rb,
lib/ruby_ptv_api/model/x_tour/tour.rb,
lib/ruby_ptv_api/model/x_tour/chain.rb,
lib/ruby_ptv_api/model/x_tour/costs.rb,
lib/ruby_ptv_api/model/x_tour/depot.rb,
lib/ruby_ptv_api/model/x_tour/fleet.rb,
lib/ruby_ptv_api/model/x_tour/train.rb,
lib/ruby_ptv_api/model/x_route/reach.rb,
lib/ruby_ptv_api/model/x_route/route.rb,
lib/ruby_ptv_api/model/x_tour/trailer.rb,
lib/ruby_ptv_api/model/x_tour/vehicle.rb,
lib/ruby_ptv_api/model/x_tour/interval.rb,
lib/ruby_ptv_api/operation/x_tour/base.rb,
lib/ruby_ptv_api/model/x_locate/address.rb,
lib/ruby_ptv_api/model/x_route/via_type.rb,
lib/ruby_ptv_api/operation/x_route/base.rb,
lib/ruby_ptv_api/model/x_locate/location.rb,
lib/ruby_ptv_api/model/x_route/emissions.rb,
lib/ruby_ptv_api/model/x_route/way_point.rb,
lib/ruby_ptv_api/model/x_tour/capacities.rb,
lib/ruby_ptv_api/model/x_tour/quantities.rb,
lib/ruby_ptv_api/model/x_tour/tour_event.rb,
lib/ruby_ptv_api/model/x_tour/tour_point.rb,
lib/ruby_ptv_api/operation/x_locate/base.rb,
lib/ruby_ptv_api/model/x_route/hbefa_type.rb,
lib/ruby_ptv_api/model/x_route/norm_speed.rb,
lib/ruby_ptv_api/model/x_route/reach_info.rb,
lib/ruby_ptv_api/model/x_route/route_info.rb,
lib/ruby_ptv_api/model/x_tour/plan_result.rb,
lib/ruby_ptv_api/model/x_tour/total_costs.rb,
lib/ruby_ptv_api/model/x_tour/tour_result.rb,
lib/ruby_ptv_api/model/x_locate/suggestion.rb,
lib/ruby_ptv_api/model/x_route/line_string.rb,
lib/ruby_ptv_api/model/x_route/speed_limit.rb,
lib/ruby_ptv_api/model/x_tour/base_vehicle.rb,
lib/ruby_ptv_api/model/x_tour/chain_result.rb,
lib/ruby_ptv_api/model/x_tour/loading_area.rb,
lib/ruby_ptv_api/model/x_tour/restrictions.rb,
lib/ruby_ptv_api/model/x_locate/sort_option.rb,
lib/ruby_ptv_api/model/x_route/dynamic_info.rb,
lib/ruby_ptv_api/model/x_route/speed_limits.rb,
lib/ruby_ptv_api/model/x_tour/abstract_tour.rb,
lib/ruby_ptv_api/model/x_tour/vehicle_costs.rb,
lib/ruby_ptv_api/model/x_route/cen_emissions.rb,
lib/ruby_ptv_api/model/x_route/emission_type.rb,
lib/ruby_ptv_api/model/x_route/unique_geo_id.rb,
lib/ruby_ptv_api/model/x_route/waypoint_desc.rb,
lib/ruby_ptv_api/model/x_tour/abstract_costs.rb,
lib/ruby_ptv_api/model/x_tour/logistic_point.rb,
lib/ruby_ptv_api/model/x_route/exception_path.rb,
lib/ruby_ptv_api/model/x_route/manoeuvre_attr.rb,
lib/ruby_ptv_api/model/x_route/routing_option.rb,
lib/ruby_ptv_api/model/x_route/vehicle_option.rb,
lib/ruby_ptv_api/model/x_tour/driver_settings.rb,
lib/ruby_ptv_api/model/x_tour/goal_importance.rb,
lib/ruby_ptv_api/model/x_tour/planning_params.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_plan.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_tour.rb,
lib/ruby_ptv_api/model/x_tour/standard_params.rb,
lib/ruby_ptv_api/model/x_tour/tour_violations.rb,
lib/ruby_ptv_api/model/x_tour/transport_depot.rb,
lib/ruby_ptv_api/model/x_tour/transport_order.rb,
lib/ruby_ptv_api/model/x_tour/transport_point.rb,
lib/ruby_ptv_api/model/x_locate/result_address.rb,
lib/ruby_ptv_api/model/x_route/manoeuvre_group.rb,
lib/ruby_ptv_api/model/x_route/route_manoeuvre.rb,
lib/ruby_ptv_api/model/x_route/urban_manoeuvre.rb,
lib/ruby_ptv_api/model/x_tour/abstract_vehicle.rb,
lib/ruby_ptv_api/model/x_tour/loading_function.rb,
lib/ruby_ptv_api/model/x_tour/regulations_base.rb,
lib/ruby_ptv_api/model/x_route/encoded_geometry.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_params.rb,
lib/ruby_ptv_api/model/x_tour/tour_point_result.rb,
lib/ruby_ptv_api/model/x_tour/tour_restrictions.rb,
lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb,
lib/ruby_ptv_api/model/x_locate/additional_field.rb,
lib/ruby_ptv_api/model/x_locate/address_response.rb,
lib/ruby_ptv_api/model/x_route/brunnel_manoeuvre.rb,
lib/ruby_ptv_api/model/x_route/plain_line_string.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_vehicle.rb,
lib/ruby_ptv_api/model/x_tour/vehicle_violations.rb,
lib/ruby_ptv_api/operation/x_locate/find_address.rb,
lib/ruby_ptv_api/model/x_route/bounding_rectangle.rb,
lib/ruby_ptv_api/model/x_route/route_list_segment.rb,
lib/ruby_ptv_api/model/x_route/segment_attributes.rb,
lib/ruby_ptv_api/model/x_tour/abstract_tour_point.rb,
lib/ruby_ptv_api/operation/x_locate/find_location.rb,
lib/ruby_ptv_api/model/x_route/plain_geometry_base.rb,
lib/ruby_ptv_api/model/x_route/result_list_options.rb,
lib/ruby_ptv_api/model/x_tour/abstract_tour_result.rb,
lib/ruby_ptv_api/model/x_tour/vehicle_restrictions.rb,
lib/ruby_ptv_api/operation/x_locate/find_addresses.rb,
lib/ruby_ptv_api/operation/x_locate/find_locations.rb,
lib/ruby_ptv_api/operation/x_route/calculate_route.rb,
lib/ruby_ptv_api/operation/x_tour/plan_basic_tours.rb,
lib/ruby_ptv_api/model/x_locate/suggestion_response.rb,
lib/ruby_ptv_api/model/x_route/feauture_description.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_tour_point.rb,
lib/ruby_ptv_api/operation/x_locate/find_suggestion.rb,
lib/ruby_ptv_api/model/x_route/commuter_travel_trend.rb,
lib/ruby_ptv_api/model/x_route/expansion_description.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_plan_result.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_tour_result.rb,
lib/ruby_ptv_api/model/x_route/cen_emission_scenarios.rb,
lib/ruby_ptv_api/model/x_tour/distance_matrix_by_road.rb,
lib/ruby_ptv_api/model/x_tour/product_incompatibility.rb,
lib/ruby_ptv_api/model/x_tour/abstract_transport_order.rb,
lib/ruby_ptv_api/model/x_tour/seconds_per_quantity_unit.rb,
lib/ruby_ptv_api/operation/x_route/calculate_route_info.rb,
lib/ruby_ptv_api/model/x_route/detail_description_option.rb,
lib/ruby_ptv_api/model/x_tour/quantity_dependent_periods.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_transport_depot.rb,
lib/ruby_ptv_api/model/x_tour/sequencing_transport_order.rb,
lib/ruby_ptv_api/operation/x_locate/find_address_by_text.rb,
lib/ruby_ptv_api/model/x_locate/result_combined_transport.rb,
lib/ruby_ptv_api/model/x_route/cen_emission_configuration.rb,
lib/ruby_ptv_api/model/x_tour/distance_matrix_calculation.rb,
lib/ruby_ptv_api/model/x_locate/combined_transport_location.rb,
lib/ruby_ptv_api/model/x_locate/combined_transport_response.rb,
lib/ruby_ptv_api/model/x_tour/maximum_tour_period_restriction.rb,
lib/ruby_ptv_api/model/x_route/cen_emission_conversion_factors.rb,
lib/ruby_ptv_api/operation/x_route/calculate_reachable_objects.rb,
lib/ruby_ptv_api/model/x_tour/unscheduled_order_analysis_result.rb,
lib/ruby_ptv_api/operation/x_locate/find_combined_transport_by_location.rb
Defined Under Namespace
Modules: Constant, Model, Operation, XTour Classes: BadResponse, Base, Configuration, IdManager, MissingParameter, TooManyParameters, WrongParameterFormat
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
- .cast_coordinate(coord) ⇒ Object
-
.config ⇒ Object
Return configuration parameters.
-
.configure {|@config ||= Configuration.new| ... } ⇒ Object
Class method to set up configuration parameters.
Class Method Details
.cast_coordinate(coord) ⇒ Object
199 200 201 |
# File 'lib/ruby_ptv_api.rb', line 199 def self.cast_coordinate(coord) coord.to_i.to_s.size != 7 ? (coord * 100000).to_i : coord end |
.config ⇒ Object
Return configuration parameters
170 171 172 173 174 175 |
# File 'lib/ruby_ptv_api.rb', line 170 def self.config if @config.nil? or @config.instance_variables.count != 3 raise 'RubyPtvApi gem uncompleted config' end @config end |
.configure {|@config ||= Configuration.new| ... } ⇒ Object
Class method to set up configuration parameters
160 161 162 163 |
# File 'lib/ruby_ptv_api.rb', line 160 def self.configure(&block) Oj. = { :mode => :compat } yield @config ||= Configuration.new end |