Module: ActiveSmsgate::Gateway
- Defined in:
- lib/active_smsgate/gateway.rb,
lib/active_smsgate/gateways/amegainform.rb
Overview
:nodoc:
Defined Under Namespace
Classes: Amegainform, Gateway
Class Method Summary collapse
-
.gateway(gw) ⇒ Object
получение шлюза по его имени.
-
.support_gateways ⇒ Object
Список поддерживаемых.
Class Method Details
.gateway(gw) ⇒ Object
получение шлюза по его имени
28 29 30 |
# File 'lib/active_smsgate/gateway.rb', line 28 def gateway(gw) "active_smsgate/gateway/#{gw.to_s}".classify.constantize end |
.support_gateways ⇒ Object
Список поддерживаемых
20 21 22 23 24 25 |
# File 'lib/active_smsgate/gateway.rb', line 20 def support_gateways Dir["#{File.dirname(__FILE__)}/gateways/**/*.rb"].map { |gw| gateway = "active_smsgate/gateway/#{File.basename(gw, ".rb")}".classify.constantize { :class => File.basename(gw, ".rb"), :alias => gateway::ALIAS, :short_desc => gateway::SHORT_DESC, :desc => gateway::DESC} } end |