Sha256: ed0c3659c5464a7e554eae595ac5f01a51505ddbd57721a0109323651591c6b0

Contents?: true

Size: 395 Bytes

Versions: 8

Compression:

Stored size: 395 Bytes

Contents

class Barkdog::DSL::Context::Monitor::Options
  include Barkdog::TemplateHelper

  def initialize(context, &block)
    @context = context.dup
    @result = {}
    instance_eval(&block)
  end

  attr_reader :result

  private

  def method_missing(method_name, *args)
    if args.length == 1
      value = args.first
      @result[method_name.to_s] = value
    else
      super
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
barkdog-0.1.9 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.8 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.7 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.6 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.5 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.4 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.3 lib/barkdog/dsl/context/monitor/options.rb
barkdog-0.1.3.beta lib/barkdog/dsl/context/monitor/options.rb