Class: RDoc::Plugin

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

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ Plugin


201
202
203
204
205
206
# File 'lib/puppet/util/rdoc/code_objects.rb', line 201

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

Instance Attribute Details

#nameObject

Returns the value of attribute name


199
200
201
# File 'lib/puppet/util/rdoc/code_objects.rb', line 199

def name
  @name
end

#typeObject

Returns the value of attribute type


199
200
201
# File 'lib/puppet/util/rdoc/code_objects.rb', line 199

def type
  @type
end

Instance Method Details

#<=>(other) ⇒ Object


208
209
210
# File 'lib/puppet/util/rdoc/code_objects.rb', line 208

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

#full_nameObject


212
213
214
# File 'lib/puppet/util/rdoc/code_objects.rb', line 212

def full_name
  @name
end

#http_url(prefix) ⇒ Object


216
217
218
219
# File 'lib/puppet/util/rdoc/code_objects.rb', line 216

def http_url(prefix)
  path = full_name.split("::")
  File.join(prefix, *path) + ".html"
end

#is_fact?Boolean


221
222
223
# File 'lib/puppet/util/rdoc/code_objects.rb', line 221

def is_fact?
  false
end

#to_sObject


225
226
227
228
229
# File 'lib/puppet/util/rdoc/code_objects.rb', line 225

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