Sha256: 100033054d0680e874808e65cd6c6e70d85cecb05e7f78bf65d5b6c18ca7ba45

Contents?: true

Size: 354 Bytes

Versions: 10

Compression:

Stored size: 354 Bytes

Contents

require 'emitter'

module BrighterPlanet
  module Automobile
    extend BrighterPlanet::Emitter

    def self.automobile_model
      if Object.const_defined? 'Automobile'
        ::Automobile
      elsif Object.const_defined? 'AutomobileRecord'
        AutomobileRecord
      else
        raise 'There is no automobile model'
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
automobile-0.1.2 lib/automobile.rb
automobile-0.1.1 lib/automobile.rb
automobile-0.1.0 lib/automobile.rb
automobile-0.0.16 lib/automobile.rb
automobile-0.0.15 lib/automobile.rb
automobile-ruby19-0.0.13 lib/automobile.rb
automobile-0.0.13 lib/automobile.rb
automobile-0.0.12 lib/automobile.rb
automobile-0.0.11 lib/automobile.rb
automobile-0.0.10 lib/automobile.rb