Class: RDoc::Fact
- Defined in:
- lib/puppet/util/rdoc/code_objects.rb
Overview
Fact holds a custom fact It is mapped to a HTMLPuppetPlugin for display
Instance Attribute Summary collapse
-
#confine ⇒ Object
Returns the value of attribute confine.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #full_name ⇒ Object
-
#initialize(name, confine) ⇒ Fact
constructor
A new instance of Fact.
- #is_fact? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(name, confine) ⇒ Fact
Returns a new instance of Fact.
276 277 278 279 280 281 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 276 def initialize(name, confine) super() @name = name @confine = confine @comment = "" end |
Instance Attribute Details
#confine ⇒ Object
Returns the value of attribute confine.
274 275 276 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 274 def confine @confine end |
#name ⇒ Object
Returns the value of attribute name.
274 275 276 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 274 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
283 284 285 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 283 def <=>(other) @name <=> other.name end |
#full_name ⇒ Object
291 292 293 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 291 def full_name @name end |
#is_fact? ⇒ Boolean
287 288 289 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 287 def is_fact? true end |
#to_s ⇒ Object
295 296 297 298 299 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 295 def to_s res = self.class.name + ": #{@name}\n" res << @comment.to_s res end |