Class: Generators::HTMLPuppetResource
- Includes:
- MarkUp
- Defined in:
- lib/puppet/util/rdoc/generators/puppet_generator.rb
Constant Summary collapse
- @@seq =
"R000000"
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #aref ⇒ Object
- #as_href(from_path) ⇒ Object
- #description ⇒ Object
- #document_self ⇒ Object
- #find_symbol(symbol, method = nil) ⇒ Object
- #index_name ⇒ Object
-
#initialize(context, html_class, options) ⇒ HTMLPuppetResource
constructor
A new instance of HTMLPuppetResource.
- #name ⇒ Object
- #params ⇒ Object
- #parent_name ⇒ Object
- #path ⇒ Object
- #section ⇒ Object
Methods included from MarkUp
Constructor Details
#initialize(context, html_class, options) ⇒ HTMLPuppetResource
Returns a new instance of HTMLPuppetResource.
829 830 831 832 833 834 835 836 837 838 839 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 829 def initialize(context, html_class, ) @context = context @html_class = html_class @options = @@seq = @@seq.succ @seq = @@seq context.viewer = self AllReferences.add(name, self) end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
825 826 827 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 825 def context @context end |
Instance Method Details
#<=>(other) ⇒ Object
889 890 891 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 889 def <=>(other) @context <=> other.context end |
#aref ⇒ Object
873 874 875 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 873 def aref @seq end |
#as_href(from_path) ⇒ Object
841 842 843 844 845 846 847 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 841 def as_href(from_path) if @options.all_one_file "##{path}" else HTMLGenerator.gen_url(from_path, path) end end |
#description ⇒ Object
885 886 887 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 885 def description markup(@context.comment) end |
#document_self ⇒ Object
893 894 895 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 893 def document_self @context.document_self end |
#find_symbol(symbol, method = nil) ⇒ Object
897 898 899 900 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 897 def find_symbol(symbol, method=nil) res = @context.parent.find_symbol(symbol, method) res &&= res.viewer end |
#index_name ⇒ Object
857 858 859 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 857 def index_name "#{@context.name}" end |
#name ⇒ Object
849 850 851 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 849 def name @context.name end |
#params ⇒ Object
861 862 863 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 861 def params @context.params end |
#parent_name ⇒ Object
865 866 867 868 869 870 871 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 865 def parent_name if @context.parent.parent @context.parent.parent.full_name else nil end end |
#path ⇒ Object
877 878 879 880 881 882 883 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 877 def path if @options.all_one_file aref else @html_class.path + "##{aref}" end end |
#section ⇒ Object
853 854 855 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 853 def section @context.section end |