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.



236
237
238
239
240
241
# File 'lib/puppet/util/rdoc/code_objects.rb', line 236

def initialize(name, confine)
  super()
  @name = name
  @confine = confine
  @comment = ""
end

Instance Attribute Details

#confineObject

Returns the value of attribute confine.



234
235
236
# File 'lib/puppet/util/rdoc/code_objects.rb', line 234

def confine
  @confine
end

#nameObject

Returns the value of attribute name.



234
235
236
# File 'lib/puppet/util/rdoc/code_objects.rb', line 234

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



243
244
245
# File 'lib/puppet/util/rdoc/code_objects.rb', line 243

def <=>(other)
  @name <=> other.name
end

#full_nameObject



251
252
253
# File 'lib/puppet/util/rdoc/code_objects.rb', line 251

def full_name
  @name
end

#is_fact?Boolean

Returns:

  • (Boolean)


247
248
249
# File 'lib/puppet/util/rdoc/code_objects.rb', line 247

def is_fact?
  true
end

#to_sObject



255
256
257
258
259
# File 'lib/puppet/util/rdoc/code_objects.rb', line 255

def to_s
  res = self.class.name + ": #{@name}\n"
  res << @comment.to_s
  res
end