Class: RDoc::Fact

Inherits:
Context show all
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

Instance Method Summary collapse

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

#confineObject

Returns the value of attribute confine.



274
275
276
# File 'lib/puppet/util/rdoc/code_objects.rb', line 274

def confine
  @confine
end

#nameObject

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_nameObject



291
292
293
# File 'lib/puppet/util/rdoc/code_objects.rb', line 291

def full_name
  @name
end

#is_fact?Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/puppet/util/rdoc/code_objects.rb', line 287

def is_fact?
  true
end

#to_sObject



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