Sha256: 7bca6f371b0f51edd17b81b1e2e1e1f792438656be3d6cef62e58d70fd68df06

Contents?: true

Size: 517 Bytes

Versions: 14

Compression:

Stored size: 517 Bytes

Contents

module CanTango
  class Configuration
    class Engines
      class Engine
        def set state = :on
          raise ArgumentError, "Must be :on or :off" unless !state || [:on, :off].include?(state)
          @state = state || :on
        end

        def reset!
          @state = nil
        end

        def on?
          @state == :on
        end

        def off?
          !on?
        end

        protected

        def ns
          CanTango::Configuration::Engines
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cantango-0.9.3.2 lib/cantango/configuration/engines/engine.rb
cantango-0.8.9.5 lib/cantango/configuration/engines/engine.rb
cantango-0.8.9.4 lib/cantango/configuration/engines/engine.rb
cantango-0.8.9.3 lib/cantango/configuration/engines/engine.rb
cantango-0.8.9.2 lib/cantango/configuration/engines/engine.rb
cantango-0.8.9.1 lib/cantango/configuration/engines/engine.rb
cantango-0.8.9 lib/cantango/configuration/engines/engine.rb
cantango-0.8.8.1 lib/cantango/configuration/engines/engine.rb
cantango-0.8.8 lib/cantango/configuration/engines/engine.rb
cantango-0.8.7 lib/cantango/configuration/engines/engine.rb
cantango-0.8.6.2 lib/cantango/configuration/engines/engine.rb
cantango-0.8.6.1 lib/cantango/configuration/engines/engine.rb
cantango-0.8.6 lib/cantango/configuration/engines/engine.rb
cantango-0.8.5.1 lib/cantango/configuration/engines/engine.rb