Class: TxtHoldingExport
- Inherits:
-
AjaxExport
- Object
- Service
- AjaxExport
- TxtHoldingExport
- Defined in:
- app/service_adaptors/txt_holding_export.rb
Overview
Since this relies on finding holdings that exist, you need to run it in a service wave AFTER anything that might generate holdings.
Constant Summary
Constants inherited from Service
Service::LinkOutFilterTask, Service::StandardTask
Instance Attribute Summary
Attributes inherited from Service
#group, #name, #priority, #request, #service_id, #status, #task, #url
Instance Method Summary collapse
- #handle(request) ⇒ Object
-
#initialize(config) ⇒ TxtHoldingExport
constructor
A new instance of TxtHoldingExport.
Methods inherited from AjaxExport
#response_url, #service_types_generated
Methods inherited from Service
#credits, #display_name, #handle_wrapper, #link_out_filter, #preempted_by, required_config_params, #response_url, #service_types_generated, #translate
Constructor Details
#initialize(config) ⇒ TxtHoldingExport
Returns a new instance of TxtHoldingExport.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/service_adaptors/txt_holding_export.rb', line 5 def initialize(config) @display_text = 'Send to phone' @display_text_i18n = "display_text" @form_controller = "export_email" @form_action = "txt" # providers is a hash of: # user-presentable-string => hostname for email to txt service. @providers = { "AT&T" => "txt.att.net", "Nextel" => "messaging.nextel.com", "Sprint" => "messaging.sprintpcs.com", "T-Mobile"=> "tmomail.net", "Verizon"=> "vtext.com", "Virgin"=> "vmobl.com" } super(config) end |
Instance Method Details
#handle(request) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/service_adaptors/txt_holding_export.rb', line 23 def handle(request) holdings = request.get_service_type('holding', { :refresh => true }) unless holdings.nil? or holdings.empty? super(request) else return request.dispatched(self, true) end end |