Sha256: 6bc1eb4be62e1ac8c0ae3b833d530d712f0f5085973ce7a826540d6c302ca510

Contents?: true

Size: 520 Bytes

Versions: 104

Compression:

Stored size: 520 Bytes

Contents

module ZTK::DSL::Core

  # @author Zachary Patten <zachary AT jovelabs DOT com>
  # @api private
  module Options

    def self.included(base)
      base.class_eval do
        base.send(:extend, ZTK::DSL::Core::Options::ClassMethods)
      end
    end

    # @author Zachary Patten <zachary AT jovelabs DOT com>
    module ClassMethods

      def add_option(key)
        option_key = "#{key}_options"
        cattr_accessor option_key
        send(option_key) || send("#{option_key}=", {})
      end

    end

  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
ztk-1.11.1 lib/ztk/dsl/core/options.rb
ztk-1.11.0 lib/ztk/dsl/core/options.rb
ztk-1.10.6 lib/ztk/dsl/core/options.rb
ztk-1.10.5 lib/ztk/dsl/core/options.rb
ztk-1.10.4 lib/ztk/dsl/core/options.rb
ztk-1.10.3 lib/ztk/dsl/core/options.rb
ztk-1.10.2 lib/ztk/dsl/core/options.rb
ztk-1.10.1 lib/ztk/dsl/core/options.rb
ztk-1.10.0 lib/ztk/dsl/core/options.rb
ztk-1.9.1 lib/ztk/dsl/core/options.rb
ztk-1.9.0 lib/ztk/dsl/core/options.rb
ztk-1.8.0 lib/ztk/dsl/core/options.rb
ztk-1.7.1 lib/ztk/dsl/core/options.rb
ztk-1.7.0 lib/ztk/dsl/core/options.rb
ztk-1.6.30 lib/ztk/dsl/core/options.rb
ztk-1.6.29 lib/ztk/dsl/core/options.rb
ztk-1.6.28 lib/ztk/dsl/core/options.rb
ztk-1.6.27 lib/ztk/dsl/core/options.rb
ztk-1.6.26 lib/ztk/dsl/core/options.rb
ztk-1.6.25 lib/ztk/dsl/core/options.rb