Sha256: 98a9d4ff19763bfc1d69042d9b56f500639123282ae7b68b16dcb8064e079d9c
Contents?: true
Size: 836 Bytes
Versions: 10
Compression:
Stored size: 836 Bytes
Contents
module Dox module DSL class Resource include AttrProxy attr_writer :name attr_writer :group attr_writer :endpoint attr_writer :desc def initialize(name, &block) self.name = name instance_eval(&block) raise(Dox::Errors::InvalidResourceError, 'Resource name is required!') if @name.blank? raise(Dox::Errors::InvalidResourceError, 'Resource group is required!') if @group.blank? raise(Dox::Errors::InvalidResourceError, 'Resource endpoint is required!') if @endpoint.blank? end def config { resource_name: @name.presence, resource_desc: @desc.presence, resource_group_name: @group.presence, resource_endpoint: @endpoint.presence, apidoc: true } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems