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.
-
#host ⇒ Object
Returns the value of attribute host.
-
#name ⇒ Object
Returns the value of attribute name.
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.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/jazzy/source_module.rb', line 20 def initialize(, docs, doc_structure, doc_coverage) self.docs = docs self.doc_structure = doc_structure self.doc_coverage = doc_coverage self.name = .module_name self. = . self. = . self.host = SourceHost.create() return unless .dash_url self.dash_url = "dash-feed://#{ERB::Util.url_encode(.dash_url.to_s)}" end |
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name.
15 16 17 |
# File 'lib/jazzy/source_module.rb', line 15 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.
13 14 15 |
# File 'lib/jazzy/source_module.rb', line 13 def doc_coverage @doc_coverage end |
#doc_structure ⇒ Object
Returns the value of attribute doc_structure.
14 15 16 |
# File 'lib/jazzy/source_module.rb', line 14 def doc_structure @doc_structure end |
#docs ⇒ Object
Returns the value of attribute docs.
12 13 14 |
# File 'lib/jazzy/source_module.rb', line 12 def docs @docs end |
#host ⇒ Object
Returns the value of attribute host.
18 19 20 |
# File 'lib/jazzy/source_module.rb', line 18 def host @host end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/jazzy/source_module.rb', line 11 def name @name end |
Instance Method Details
#all_declarations ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/jazzy/source_module.rb', line 34 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 |