Sha256: 43099e74e78d5a46c0d3293bf4d036d1584086f9862804e6214a2708df160269

Contents?: true

Size: 269 Bytes

Versions: 7

Compression:

Stored size: 269 Bytes

Contents

module Omniship 
  module Base
    mattr_accessor :mode
    self.mode = :production
      
    def self.carrier(name)
      Omniship::Carriers.all.find {|c| c.name.downcase == name.to_s.downcase} ||
        raise(NameError, "unknown carrier #{name}")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
omniship-0.4.7 lib/omniship/base.rb
omniship-0.4.6 lib/omniship/base.rb
omniship-0.4.5 lib/omniship/base.rb
omniship-0.4.1 lib/omniship/base.rb
omniship-0.4.0 lib/omniship/base.rb
omniship-0.3.2.2 lib/omniship/base.rb
omniship-0.1.0 lib/omniship/base.rb