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.
238 239 240 241 242 243 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 238 def initialize(name, confine) super() @name = name @confine = confine @comment = "" end |
Instance Attribute Details
#confine ⇒ Object
Returns the value of attribute confine.
236 237 238 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 236 def confine @confine end |
#name ⇒ Object
Returns the value of attribute name.
236 237 238 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 236 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
245 246 247 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 245 def <=>(other) @name <=> other.name end |
#full_name ⇒ Object
253 254 255 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 253 def full_name @name end |
#is_fact? ⇒ Boolean
249 250 251 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 249 def is_fact? true end |
#to_s ⇒ Object
257 258 259 260 261 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 257 def to_s res = self.class.name + ": #{@name}\n" res << @comment.to_s res end |