Class: Jazzy::SourceModule
- Inherits:
-
Object
- Object
- Jazzy::SourceModule
- Defined in:
- lib/jazzy/source_module.rb
Instance Attribute Summary collapse
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#author_url ⇒ Object
Returns the value of attribute author_url.
-
#dash_url ⇒ Object
Returns the value of attribute dash_url.
-
#doc_coverage ⇒ Object
Returns the value of attribute doc_coverage.
-
#doc_structure ⇒ Object
Returns the value of attribute doc_structure.
-
#docs ⇒ Object
Returns the value of attribute docs.
-
#github_file_prefix ⇒ Object
Returns the value of attribute github_file_prefix.
-
#github_url ⇒ Object
Returns the value of attribute github_url.
-
#name ⇒ Object
Returns the value of attribute name.
-
#root_path ⇒ Object
Returns the value of attribute root_path.
Instance Method Summary collapse
- #all_declarations ⇒ Object
-
#initialize(options, docs, doc_structure, doc_coverage) ⇒ SourceModule
constructor
A new instance of SourceModule.
Constructor Details
#initialize(options, docs, doc_structure, doc_coverage) ⇒ SourceModule
Returns a new instance of SourceModule.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/jazzy/source_module.rb', line 19 def initialize(, docs, doc_structure, doc_coverage) self.docs = docs self.root_path = .source_directory self.doc_structure = doc_structure self.doc_coverage = doc_coverage self.name = .module_name self. = . self.github_url = .github_url self.github_file_prefix = .github_file_prefix self. = . return unless .dash_url self.dash_url = "dash-feed://#{URI.encode(.dash_url.to_s, /\W/)}" end |
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name.
13 14 15 |
# File 'lib/jazzy/source_module.rb', line 13 def @author_name end |
#author_url ⇒ Object
Returns the value of attribute author_url.
16 17 18 |
# File 'lib/jazzy/source_module.rb', line 16 def @author_url end |
#dash_url ⇒ Object
Returns the value of attribute dash_url.
17 18 19 |
# File 'lib/jazzy/source_module.rb', line 17 def dash_url @dash_url end |
#doc_coverage ⇒ Object
Returns the value of attribute doc_coverage.
11 12 13 |
# File 'lib/jazzy/source_module.rb', line 11 def doc_coverage @doc_coverage end |
#doc_structure ⇒ Object
Returns the value of attribute doc_structure.
12 13 14 |
# File 'lib/jazzy/source_module.rb', line 12 def doc_structure @doc_structure end |
#docs ⇒ Object
Returns the value of attribute docs.
10 11 12 |
# File 'lib/jazzy/source_module.rb', line 10 def docs @docs end |
#github_file_prefix ⇒ Object
Returns the value of attribute github_file_prefix.
15 16 17 |
# File 'lib/jazzy/source_module.rb', line 15 def github_file_prefix @github_file_prefix end |
#github_url ⇒ Object
Returns the value of attribute github_url.
14 15 16 |
# File 'lib/jazzy/source_module.rb', line 14 def github_url @github_url end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/jazzy/source_module.rb', line 8 def name @name end |
#root_path ⇒ Object
Returns the value of attribute root_path.
9 10 11 |
# File 'lib/jazzy/source_module.rb', line 9 def root_path @root_path end |
Instance Method Details
#all_declarations ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/jazzy/source_module.rb', line 33 def all_declarations all_declarations = [] visitor = lambda do |d| all_declarations.unshift(*d) d.map(&:children).each { |c| visitor[c] } end visitor[docs] all_declarations.reject { |doc| doc.name == 'index' } end |