Class: RDoc::Plugin
- Defined in:
- lib/puppet/util/rdoc/code_objects.rb
Overview
Plugin holds a native puppet plugin (function,type…) It is mapped to a HTMLPuppetPlugin for display
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #full_name ⇒ Object
- #http_url(prefix) ⇒ Object
-
#initialize(name, type) ⇒ Plugin
constructor
A new instance of Plugin.
- #is_fact? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(name, type) ⇒ Plugin
Returns a new instance of Plugin.
202 203 204 205 206 207 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 202 def initialize(name, type) super() @name = name @type = type @comment = "" end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
200 201 202 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 200 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
200 201 202 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 200 def type @type end |
Instance Method Details
#<=>(other) ⇒ Object
209 210 211 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 209 def <=>(other) @name <=> other.name end |
#full_name ⇒ Object
213 214 215 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 213 def full_name @name end |
#http_url(prefix) ⇒ Object
217 218 219 220 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 217 def http_url(prefix) path = full_name.split("::") File.join(prefix, *path) + ".html" end |
#is_fact? ⇒ Boolean
222 223 224 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 222 def is_fact? false end |
#to_s ⇒ Object
226 227 228 229 230 |
# File 'lib/puppet/util/rdoc/code_objects.rb', line 226 def to_s res = self.class.name + ": #{@name} (#{@type})\n" res << @comment.to_s res end |