Sha256: 0da3957c58329243b75014a0c7141c49c927ee819ba103d85b2384d1a479ea97
Contents?: true
Size: 807 Bytes
Versions: 3
Compression:
Stored size: 807 Bytes
Contents
require 'singleton' module BrighterPlanet class Metadata class Data1Authority include ::Singleton def authority?(universe, method_id) return unless universe == 'data1_production' respond_to? method_id end def resources ::Dir[::File.expand_path(::File.join(::File.dirname(::Gem.required_location('earth', 'earth.rb')), 'earth', '**', '*.rb'))].select { |f| ::File.read(f) =~ /class [\:A-Za-z0-9]+ < ActiveRecord::Base/ }.map { |path| ::File.basename(path, '.rb').camelcase }.sort end def datasets ::Dir[::File.expand_path(::File.join(::Rails.root, 'app', 'models', '**', '*.rb'))].select { |f| ::File.read(f) =~ /class [\:A-Za-z0-9]+ < Dataset/ }.map { |path| ::File.basename(path, '.rb').camelcase }.sort end end end end
Version data entries
3 entries across 3 versions & 1 rubygems