Sha256: c1524e217c6640da4118794fc068949ef7f0b2a351597128376eab7e300fad19
Contents?: true
Size: 730 Bytes
Versions: 1
Compression:
Stored size: 730 Bytes
Contents
module Dox module DSL class Documentation attr_accessor :subject attr_accessor :_resource attr_accessor :_action attr_accessor :_group def initialize(opts = {}) self.subject = opts.fetch :subject end def resource(name, &block) self._resource = Resource.new(name, &block) end def action(name, &block) self._action = Action.new(name, &block) end def group(name, &block) self._group = ResourceGroup.new(name: name, &block) end def config {}.merge(_resource ? _resource.config : {}) .merge(_action ? _action.config : {}) .merge(_group ? _group.config : {}) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dox-1.0.0.alpha | lib/dox/dsl/documentation.rb |