Class: DocumentingLWRPBase
- Inherits:
-
Chef::Resource::LWRPBase
- Object
- Chef::Resource::LWRPBase
- DocumentingLWRPBase
- Defined in:
- lib/knife_cookbook_doc/documenting_lwrp_base.rb
Class Method Summary collapse
- .attribute(attr_name, validation_opts = {}) ⇒ Object
- .attribute_specifications ⇒ Object
- .desc(description) ⇒ Object
- .description ⇒ Object
Class Method Details
.attribute(attr_name, validation_opts = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/knife_cookbook_doc/documenting_lwrp_base.rb', line 19 def self.attribute(attr_name, validation_opts={}) result = super(attr_name, validation_opts) attribute_specifications[attr_name] = validation_opts result end |
.attribute_specifications ⇒ Object
6 7 8 |
# File 'lib/knife_cookbook_doc/documenting_lwrp_base.rb', line 6 def attribute_specifications @attribute_specifications ||= {} end |
.desc(description) ⇒ Object
10 11 12 |
# File 'lib/knife_cookbook_doc/documenting_lwrp_base.rb', line 10 def desc(description) @description = "#{@description}#{description}\n" end |
.description ⇒ Object
14 15 16 |
# File 'lib/knife_cookbook_doc/documenting_lwrp_base.rb', line 14 def description @description || "" end |