Sha256: 1484fa8c3790cec23e7b7dedd4dfbee657948ba85acfaf65be3d8c2c3b5bcae5

Contents?: true

Size: 406 Bytes

Versions: 5

Compression:

Stored size: 406 Bytes

Contents

module Happy
  class Controller
    module Configurable
      extend ActiveSupport::Concern

      def options
        @options ||= self.class.options.dup
      end

      def set(k, v)
        options[k.to_sym] = v
      end

      module ClassMethods
        def options
          @options ||= {}
        end

        def set(k, v)
          options[k.to_sym] = v
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
happy-0.1.0.pre25 lib/happy/controller/configurable.rb
happy-0.1.0.pre24 lib/happy/controller/configurable.rb
happy-0.1.0.pre23 lib/happy/controller/configurable.rb
happy-0.1.0.pre22 lib/happy/controller/configurable.rb
happy-0.1.0.pre21 lib/happy/controller/configurable.rb