Sha256: 93feccd8ba82b092874ddd150a6ce8f7515c0cf6c1e4ceedbe3d9f66c80ba13d

Contents?: true

Size: 754 Bytes

Versions: 13

Compression:

Stored size: 754 Bytes

Contents

# This gear adds inspection utilities to Camping
module Gear
  module Inspection

    # reserved module for Camping Class Methods we add because we're the best.
    module ClassMethods

    end

    module ControllersClassMethods
      # All Helper helps us inspect our Controllers from outside of the app.
      # TODO: Move to CampTools for introspection.
      def all
        all = []
        constants.map { |c|
          all << c.name if !["I", "Camper"].include? c.to_s
        }
        all
      end
    end

    def self.included(mod)
      mod.extend(ClassMethods)
      mod::Controllers.extend(ControllersClassMethods)
    end

    # empty setup as determined by the Camping Gear Spec API.
    def self.setup(app, *a, &block) end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
camping-3.2.6 lib/gear/inspection.rb
camping-3.2.5 lib/camping/gear/inspection.rb
camping-3.2.4 lib/camping/gear/inspection.rb
camping-3.2.3 lib/camping/gear/inspection.rb
camping-3.2.2 lib/camping/gear/inspection.rb
camping-3.2.1 lib/camping/gear/inspection.rb
camping-3.2.0 lib/camping/gear/inspection.rb
camping-3.1.3 lib/camping/gear/inspection.rb
camping-3.1.2 lib/camping/gear/inspection.rb
camping-3.1.0 lib/camping/gear/inspection.rb
camping-3.0.2 lib/camping/gear/inspection.rb
camping-3.0.1 lib/camping/gear/inspection.rb
camping-3.0.0 lib/camping/gear/inspection.rb