Class: CarrierInfo::Carrier
- Inherits:
-
Object
- Object
- CarrierInfo::Carrier
- Defined in:
- lib/carrier_info/carrier.rb
Class Attribute Summary collapse
-
.sources ⇒ Object
Returns the value of attribute sources.
Instance Attribute Summary collapse
-
#classification_authorized_for_hire ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_exempt_for_hire ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_federal_government ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_indian_tribe ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_local_government ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_migrant ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_other ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_private_passenger_business ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_private_passenger_non_business ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_private_property ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_state_government ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#classification_us_mail ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class).
-
#dba_name ⇒ Object
Returns the value of attribute dba_name.
-
#docket_number ⇒ Object
Returns the value of attribute docket_number.
-
#docket_prefix ⇒ Object
Returns the value of attribute docket_prefix.
-
#drivers ⇒ Object
Returns the value of attribute drivers.
-
#duns_number ⇒ Object
Returns the value of attribute duns_number.
-
#entity_type ⇒ Object
Returns the value of attribute entity_type.
-
#equipment_beverage_trucks ⇒ Object
Equipment Type.
-
#equipment_buses ⇒ Object
Equipment Type.
-
#equipment_car_carriers ⇒ Object
Equipment Type.
-
#equipment_coal_trailers ⇒ Object
Equipment Type.
-
#equipment_flatbeds ⇒ Object
Equipment Type.
-
#equipment_garbage_trucks ⇒ Object
Equipment Type.
-
#equipment_hopper_bottom ⇒ Object
Equipment Type.
-
#equipment_household_vans ⇒ Object
Equipment Type.
-
#equipment_intermodal_containers ⇒ Object
Equipment Type.
-
#equipment_livestock_rack ⇒ Object
Equipment Type.
-
#equipment_mobile_homes ⇒ Object
Equipment Type.
-
#equipment_reefers ⇒ Object
Equipment Type.
-
#equipment_tanks ⇒ Object
Equipment Type.
-
#equipment_tow_trucks ⇒ Object
Equipment Type.
-
#equipment_utility_trucks ⇒ Object
Equipment Type.
-
#equipment_vans ⇒ Object
Equipment Type.
-
#equipment_well_trucks ⇒ Object
Equipment Type.
-
#instrastate_non_hazardous ⇒ Object
Carrier Operation (safer.fmcsa.dot.gov/saferhelp.aspx#CarrierOP).
-
#interstate ⇒ Object
Carrier Operation (safer.fmcsa.dot.gov/saferhelp.aspx#CarrierOP).
-
#intrastate_hazardous ⇒ Object
Carrier Operation (safer.fmcsa.dot.gov/saferhelp.aspx#CarrierOP).
-
#legal_name ⇒ Object
Returns the value of attribute legal_name.
-
#mailing_city ⇒ Object
Returns the value of attribute mailing_city.
-
#mailing_postal_code ⇒ Object
Returns the value of attribute mailing_postal_code.
-
#mailing_state ⇒ Object
Returns the value of attribute mailing_state.
-
#mailing_street ⇒ Object
Returns the value of attribute mailing_street.
-
#mcs_150_form_date ⇒ Object
Returns the value of attribute mcs_150_form_date.
-
#mcs_150_mileage ⇒ Object
Returns the value of attribute mcs_150_mileage.
-
#mcs_150_mileage_year ⇒ Object
Returns the value of attribute mcs_150_mileage_year.
-
#operating_status ⇒ Object
Returns the value of attribute operating_status.
-
#out_of_service_date ⇒ Object
Returns the value of attribute out_of_service_date.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#physical_city ⇒ Object
Returns the value of attribute physical_city.
-
#physical_postal_code ⇒ Object
Returns the value of attribute physical_postal_code.
-
#physical_state ⇒ Object
Returns the value of attribute physical_state.
-
#physical_street ⇒ Object
Returns the value of attribute physical_street.
-
#power_units ⇒ Object
Returns the value of attribute power_units.
-
#safer_active ⇒ Object
Returns the value of attribute safer_active.
-
#safer_last_updated ⇒ Object
Returns the value of attribute safer_last_updated.
-
#state_id_number ⇒ Object
Returns the value of attribute state_id_number.
-
#usdot_number ⇒ Object
Returns the value of attribute usdot_number.
Class Method Summary collapse
Instance Method Summary collapse
- #classification_names ⇒ Object
- #equipment_names ⇒ Object
-
#initialize(args = {}) ⇒ Carrier
constructor
A new instance of Carrier.
- #research! ⇒ Object
- #sources ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Carrier
Returns a new instance of Carrier.
43 44 45 46 |
# File 'lib/carrier_info/carrier.rb', line 43 def initialize(args={}) self.docket_number = args[:docket_number] self.usdot_number = args[:usdot_number] end |
Class Attribute Details
.sources ⇒ Object
Returns the value of attribute sources.
5 6 7 |
# File 'lib/carrier_info/carrier.rb', line 5 def sources @sources end |
Instance Attribute Details
#classification_authorized_for_hire ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def @classification_authorized_for_hire end |
#classification_exempt_for_hire ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_exempt_for_hire @classification_exempt_for_hire end |
#classification_federal_government ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_federal_government @classification_federal_government end |
#classification_indian_tribe ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_indian_tribe @classification_indian_tribe end |
#classification_local_government ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_local_government @classification_local_government end |
#classification_migrant ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_migrant @classification_migrant end |
#classification_other ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_other @classification_other end |
#classification_private_passenger_business ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_private_passenger_business @classification_private_passenger_business end |
#classification_private_passenger_non_business ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_private_passenger_non_business @classification_private_passenger_non_business end |
#classification_private_property ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_private_property @classification_private_property end |
#classification_state_government ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_state_government @classification_state_government end |
#classification_us_mail ⇒ Object
Operation Classification (safer.fmcsa.dot.gov/saferhelp.aspx#Class)
26 27 28 |
# File 'lib/carrier_info/carrier.rb', line 26 def classification_us_mail @classification_us_mail end |
#dba_name ⇒ Object
Returns the value of attribute dba_name.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def dba_name @dba_name end |
#docket_number ⇒ Object
Returns the value of attribute docket_number.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def docket_number @docket_number end |
#docket_prefix ⇒ Object
Returns the value of attribute docket_prefix.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def docket_prefix @docket_prefix end |
#drivers ⇒ Object
Returns the value of attribute drivers.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def drivers @drivers end |
#duns_number ⇒ Object
Returns the value of attribute duns_number.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def duns_number @duns_number end |
#entity_type ⇒ Object
Returns the value of attribute entity_type.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def entity_type @entity_type end |
#equipment_beverage_trucks ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_beverage_trucks @equipment_beverage_trucks end |
#equipment_buses ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_buses @equipment_buses end |
#equipment_car_carriers ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_car_carriers @equipment_car_carriers end |
#equipment_coal_trailers ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_coal_trailers @equipment_coal_trailers end |
#equipment_flatbeds ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_flatbeds @equipment_flatbeds end |
#equipment_garbage_trucks ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_garbage_trucks @equipment_garbage_trucks end |
#equipment_hopper_bottom ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_hopper_bottom @equipment_hopper_bottom end |
#equipment_household_vans ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_household_vans @equipment_household_vans end |
#equipment_intermodal_containers ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_intermodal_containers @equipment_intermodal_containers end |
#equipment_livestock_rack ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_livestock_rack @equipment_livestock_rack end |
#equipment_mobile_homes ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_mobile_homes @equipment_mobile_homes end |
#equipment_reefers ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_reefers @equipment_reefers end |
#equipment_tanks ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_tanks @equipment_tanks end |
#equipment_tow_trucks ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_tow_trucks @equipment_tow_trucks end |
#equipment_utility_trucks ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_utility_trucks @equipment_utility_trucks end |
#equipment_vans ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_vans @equipment_vans end |
#equipment_well_trucks ⇒ Object
Equipment Type
36 37 38 |
# File 'lib/carrier_info/carrier.rb', line 36 def equipment_well_trucks @equipment_well_trucks end |
#instrastate_non_hazardous ⇒ Object
Carrier Operation (safer.fmcsa.dot.gov/saferhelp.aspx#CarrierOP)
33 34 35 |
# File 'lib/carrier_info/carrier.rb', line 33 def instrastate_non_hazardous @instrastate_non_hazardous end |
#interstate ⇒ Object
Carrier Operation (safer.fmcsa.dot.gov/saferhelp.aspx#CarrierOP)
33 34 35 |
# File 'lib/carrier_info/carrier.rb', line 33 def interstate @interstate end |
#intrastate_hazardous ⇒ Object
Carrier Operation (safer.fmcsa.dot.gov/saferhelp.aspx#CarrierOP)
33 34 35 |
# File 'lib/carrier_info/carrier.rb', line 33 def intrastate_hazardous @intrastate_hazardous end |
#legal_name ⇒ Object
Returns the value of attribute legal_name.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def legal_name @legal_name end |
#mailing_city ⇒ Object
Returns the value of attribute mailing_city.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mailing_city @mailing_city end |
#mailing_postal_code ⇒ Object
Returns the value of attribute mailing_postal_code.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mailing_postal_code @mailing_postal_code end |
#mailing_state ⇒ Object
Returns the value of attribute mailing_state.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mailing_state @mailing_state end |
#mailing_street ⇒ Object
Returns the value of attribute mailing_street.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mailing_street @mailing_street end |
#mcs_150_form_date ⇒ Object
Returns the value of attribute mcs_150_form_date.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mcs_150_form_date @mcs_150_form_date end |
#mcs_150_mileage ⇒ Object
Returns the value of attribute mcs_150_mileage.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mcs_150_mileage @mcs_150_mileage end |
#mcs_150_mileage_year ⇒ Object
Returns the value of attribute mcs_150_mileage_year.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def mcs_150_mileage_year @mcs_150_mileage_year end |
#operating_status ⇒ Object
Returns the value of attribute operating_status.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def @operating_status end |
#out_of_service_date ⇒ Object
Returns the value of attribute out_of_service_date.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def out_of_service_date @out_of_service_date end |
#phone ⇒ Object
Returns the value of attribute phone.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def phone @phone end |
#physical_city ⇒ Object
Returns the value of attribute physical_city.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def physical_city @physical_city end |
#physical_postal_code ⇒ Object
Returns the value of attribute physical_postal_code.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def physical_postal_code @physical_postal_code end |
#physical_state ⇒ Object
Returns the value of attribute physical_state.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def physical_state @physical_state end |
#physical_street ⇒ Object
Returns the value of attribute physical_street.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def physical_street @physical_street end |
#power_units ⇒ Object
Returns the value of attribute power_units.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def power_units @power_units end |
#safer_active ⇒ Object
Returns the value of attribute safer_active.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def safer_active @safer_active end |
#safer_last_updated ⇒ Object
Returns the value of attribute safer_last_updated.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def safer_last_updated @safer_last_updated end |
#state_id_number ⇒ Object
Returns the value of attribute state_id_number.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def state_id_number @state_id_number end |
#usdot_number ⇒ Object
Returns the value of attribute usdot_number.
18 19 20 |
# File 'lib/carrier_info/carrier.rb', line 18 def usdot_number @usdot_number end |
Class Method Details
.load_sources ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/carrier_info/carrier.rb', line 8 def self.load_sources self.sources = [] Dir.new(File.dirname(__FILE__) + "/sources").each do |file| unless File.directory?(file) self.sources << ("CarrierInfo::Sources::" + file.split(".")[0].camelize).constantize end end end |
Instance Method Details
#classification_names ⇒ Object
52 53 54 |
# File 'lib/carrier_info/carrier.rb', line 52 def classification_names self.methods.select { |var| var =~ /classification_.+[^=]\Z/ && var != :classification_names } end |
#equipment_names ⇒ Object
48 49 50 |
# File 'lib/carrier_info/carrier.rb', line 48 def equipment_names self.methods.select { |var| var =~ /equipment_.+[^=]\Z/ && var != :equipment_names } end |
#research! ⇒ Object
60 61 62 63 |
# File 'lib/carrier_info/carrier.rb', line 60 def research! sources.each(&:parse!) self end |
#sources ⇒ Object
56 57 58 |
# File 'lib/carrier_info/carrier.rb', line 56 def sources self.class.sources.collect { |source| source.new(self) } end |