Class: RDoc::PuppetResource
- Defined in:
- lib/puppet/util/rdoc/code_objects.rb
Overview
PuppetResource holds a puppet resource It is mapped to a HTMLPuppetResource for display A resource is defined by its “normal” form Type
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #full_name ⇒ Object
-
#initialize(type, title, comment, params) ⇒ PuppetResource
constructor
A new instance of PuppetResource.
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(type, title, comment, params) ⇒ PuppetResource
Returns a new instance of PuppetResource.
267 268 269 270 271 272 273 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 267 def initialize(type, title, comment, params) super() @type = type @title = title @comment = comment @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
265 266 267 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 265 def params @params end |
#title ⇒ Object
Returns the value of attribute title.
265 266 267 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 265 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
265 266 267 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 265 def type @type end |
Instance Method Details
#<=>(other) ⇒ Object
275 276 277 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 275 def <=>(other) full_name <=> other.full_name end |
#full_name ⇒ Object
279 280 281 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 279 def full_name @type + "[#{@title}]" end |
#name ⇒ Object
283 284 285 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 283 def name full_name end |
#to_s ⇒ Object
287 288 289 290 291 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 287 def to_s res = @type + "[#{@title}]\n" res << @comment.to_s res end |