Sha256: 4e03ac09db54715511d9ee9e9a8caf050bc6729039d4c3256f6f269a6c58f13f

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module Ad
  module AgentArchitecture
    module Dsl
      # This class is responsible for defining the settings of a workflow
      class SettingsDsl < ChildDsl
        def method_missing(name, *args, **kwargs, &block)
          if args.length == 1 && block.nil?
            data[:settings][name] = { value: args.first, description: kwargs[:description] }
          else
            super
          end
        end

        def respond_to_missing?(_name, _include_private = false)
          true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ad-agent_architecture-0.0.24 lib/ad/agent_architecture/dsl/settings_dsl.rb
ad-agent_architecture-0.0.23 lib/ad/agent_architecture/dsl/settings_dsl.rb