Sha256: c1538b45b13dd5b77670ca4a8c6bb448b5cd29da06e92c74af9b117e74d80bb8

Contents?: true

Size: 702 Bytes

Versions: 1

Compression:

Stored size: 702 Bytes

Contents

module BrighterPlanet
  module Flight
    extend self

    def included(base)
      require 'flight/carbon_model'
      require 'flight/characterization'
      require 'flight/data'
      require 'flight/summarization'

      base.send :include, BrighterPlanet::Flight::CarbonModel
      base.send :include, BrighterPlanet::Flight::Characterization
      base.send :include, BrighterPlanet::Flight::Data
      base.send :include, BrighterPlanet::Flight::Summarization
    end
    def flight_model
      if Object.const_defined? 'Flight'
        Flight
      elsif Object.const_defined? 'FlightRecord'
        FlightRecord
      else
        raise 'There is no flight model'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flight-0.0.6 lib/flight.rb