Sha256: 6622adc0f058392efa97f52c5b19f55fd13b38bdbbeb4a2a72f74c7b5ddb548c

Contents?: true

Size: 528 Bytes

Versions: 15

Compression:

Stored size: 528 Bytes

Contents

module Dox
  module DSL
    class ResourceGroup
      include AttrProxy

      attr_writer :name
      attr_writer :desc

      def initialize(name, &block)
        self.name = name
        instance_eval(&block) if block_given?

        raise(Dox::Errors::InvalidResourceGroupError, 'Resource group name is required!') if @name.blank?
      end

      def config
        {
          resource_group_name: @name.presence,
          resource_group_desc: @desc.presence,
          apidoc: true
        }
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dox-2.4.0 lib/dox/dsl/resource_group.rb
dox-2.3.0 lib/dox/dsl/resource_group.rb
dox-2.2.0 lib/dox/dsl/resource_group.rb
dox-2.1.0 lib/dox/dsl/resource_group.rb
dox-1.3.0 lib/dox/dsl/resource_group.rb
dox-2.0.0 lib/dox/dsl/resource_group.rb
dox-2.0.0.beta3 lib/dox/dsl/resource_group.rb
dox-2.0.0.beta2 lib/dox/dsl/resource_group.rb
dox-2.0.0.beta1 lib/dox/dsl/resource_group.rb
dox-1.2.0 lib/dox/dsl/resource_group.rb
dox-1.1.0 lib/dox/dsl/resource_group.rb
dox-1.0.2 lib/dox/dsl/resource_group.rb
dox-1.0.1 lib/dox/dsl/resource_group.rb
dox-1.0.0 lib/dox/dsl/resource_group.rb
dox-1.0.0.alpha lib/dox/dsl/resource_group.rb