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.6.3 lib/ztk/dsl/core/options.rb
ztk-1.6.2 lib/ztk/dsl/core/options.rb
ztk-1.6.1 lib/ztk/dsl/core/options.rb
ztk-1.6.0 lib/ztk/dsl/core/options.rb
ztk-1.5.5 lib/ztk/dsl/core/options.rb
ztk-1.5.4 lib/ztk/dsl/core/options.rb
ztk-1.5.3 lib/ztk/dsl/core/options.rb
ztk-1.5.2 lib/ztk/dsl/core/options.rb
ztk-1.5.1 lib/ztk/dsl/core/options.rb
ztk-1.5.0 lib/ztk/dsl/core/options.rb
ztk-1.4.22 lib/ztk/dsl/core/options.rb
ztk-1.4.21 lib/ztk/dsl/core/options.rb
ztk-1.4.20 lib/ztk/dsl/core/options.rb
ztk-1.4.19 lib/ztk/dsl/core/options.rb
ztk-1.4.18 lib/ztk/dsl/core/options.rb
ztk-1.4.17 lib/ztk/dsl/core/options.rb
ztk-1.4.16 lib/ztk/dsl/core/options.rb
ztk-1.4.15 lib/ztk/dsl/core/options.rb
ztk-1.4.14 lib/ztk/dsl/core/options.rb
ztk-1.4.13 lib/ztk/dsl/core/options.rb