Sha256: 42ee8c959ae2149180348444e18efc7dc1ca56fd3a81b4e999d1f98f57bd5276

Contents?: true

Size: 549 Bytes

Versions: 10

Compression:

Stored size: 549 Bytes

Contents

require 'rocket_fuel/precheck'

module RocketFuel
  module Fix
    class AbstractFix
      class << self
        def fix_name(fix_name)
          @fix_name = fix_name
        end

        def fix_name_value
          @fix_name
        end

        def register!
          RocketFuel::Precheck.register_fix(self)
        end
      end

      def check
        unless @check
          if klass = RocketFuel::Precheck.checks[self.class.fix_name_value]
            @check = klass.new
          end
        end
        @check
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rocket_fuel-0.2.0 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.1.0 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.8 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.7 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.6 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.5 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.4 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.3 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.2 lib/rocket_fuel/fix/abstract_fix.rb
rocket_fuel-0.0.1 lib/rocket_fuel/fix/abstract_fix.rb