Class: Trifle::Docs::Configuration
- Inherits:
-
Object
- Object
- Trifle::Docs::Configuration
- Defined in:
- lib/trifle/docs/configuration.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#path ⇒ Object
Returns the value of attribute path.
-
#views ⇒ Object
Returns the value of attribute views.
Instance Method Summary collapse
- #harvester ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #register_harvester(harvester) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 |
# File 'lib/trifle/docs/configuration.rb', line 8 def initialize @harvesters = [] @path = nil @namespace = nil @cache = true end |
Instance Attribute Details
#cache ⇒ Object
Returns the value of attribute cache.
6 7 8 |
# File 'lib/trifle/docs/configuration.rb', line 6 def cache @cache end |
#layout ⇒ Object
Returns the value of attribute layout.
6 7 8 |
# File 'lib/trifle/docs/configuration.rb', line 6 def layout @layout end |
#namespace ⇒ Object
Returns the value of attribute namespace.
6 7 8 |
# File 'lib/trifle/docs/configuration.rb', line 6 def namespace @namespace end |
#path ⇒ Object
Returns the value of attribute path.
6 7 8 |
# File 'lib/trifle/docs/configuration.rb', line 6 def path @path end |
#views ⇒ Object
Returns the value of attribute views.
6 7 8 |
# File 'lib/trifle/docs/configuration.rb', line 6 def views @views end |
Instance Method Details
#harvester ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/trifle/docs/configuration.rb', line 15 def harvester @harvester ||= Trifle::Docs::Harvester::Walker.new( path: path, harvesters: @harvesters, namespace: namespace, cache: cache ) end |
#register_harvester(harvester) ⇒ Object
24 25 26 |
# File 'lib/trifle/docs/configuration.rb', line 24 def register_harvester(harvester) @harvesters << harvester end |