Sha256: 77fcf82320989be04706fab9a7d8873a4e6aafc6ee7b6b83ee6fb84774dc0e26

Contents?: true

Size: 358 Bytes

Versions: 5

Compression:

Stored size: 358 Bytes

Contents

require 'emitter'

module BrighterPlanet
  module Motorcycle
    extend BrighterPlanet::Emitter
    
    def self.motorcycle_model
      if Object.const_defined? 'Motorcycle'
        ::Motorcycle
      elsif Object.const_defined? 'MotorcycleRecord'
        MotorcycleRecord
      else
        raise 'There is no motorcycle model'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
motorcycle-0.0.12 lib/motorcycle.rb
motorcycle-0.0.11 lib/motorcycle.rb
motorcycle-0.0.10 lib/motorcycle.rb
motorcycle-0.0.9 lib/motorcycle.rb
motorcycle-0.0.8 lib/motorcycle.rb