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.
823 824 825 826 827 828 829 830 831 832 833 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 823 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.
819 820 821 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 819 def context @context end |
Instance Method Details
#<=>(other) ⇒ Object
883 884 885 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 883 def <=>(other) @context <=> other.context end |
#aref ⇒ Object
867 868 869 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 867 def aref @seq end |
#as_href(from_path) ⇒ Object
835 836 837 838 839 840 841 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 835 def as_href(from_path) if @options.all_one_file "##{path}" else HTMLGenerator.gen_url(from_path, path) end end |
#description ⇒ Object
879 880 881 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 879 def description markup(@context.comment) end |
#document_self ⇒ Object
887 888 889 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 887 def document_self @context.document_self end |
#find_symbol(symbol, method = nil) ⇒ Object
891 892 893 894 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 891 def find_symbol(symbol, method = nil) res = @context.parent.find_symbol(symbol, method) res && res.viewer end |
#index_name ⇒ Object
851 852 853 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 851 def index_name @context.name.to_s end |
#name ⇒ Object
843 844 845 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 843 def name @context.name end |
#params ⇒ Object
855 856 857 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 855 def params @context.params end |
#parent_name ⇒ Object
859 860 861 862 863 864 865 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 859 def parent_name if @context.parent.parent @context.parent.parent.full_name else nil end end |
#path ⇒ Object
871 872 873 874 875 876 877 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 871 def path if @options.all_one_file aref else @html_class.path + "##{aref}" end end |
#section ⇒ Object
847 848 849 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 847 def section @context.section end |