Sha256: faad7eeffa530db5a64f34fed5d535a9b1f70fbe125e980cb4d504dd245bd97f
Contents?: true
Size: 452 Bytes
Versions: 3
Compression:
Stored size: 452 Bytes
Contents
module CanTango class Configuration module Modes def modes @modes ||= [:no_cache] end def mode= mode_name mode_name = mode_name.to_sym raise ArgumentError, "Not a valid mode name" if !valid_mode_names.include? mode_name @modes = (mode_name == :both) ? [:cache, :no_cache] : [mode_name] end private def valid_mode_names [:cache, :no_cache] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cantango-config-0.1.2 | lib/cantango/configuration/modes.rb |
cantango-config-0.1.1 | lib/cantango/configuration/modes.rb |
cantango-config-0.1.0 | lib/cantango/configuration/modes.rb |