Class: Trifle::Docs::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/trifle/docs/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#cacheObject

Returns the value of attribute cache.



6
7
8
# File 'lib/trifle/docs/configuration.rb', line 6

def cache
  @cache
end

#layoutObject

Returns the value of attribute layout.



6
7
8
# File 'lib/trifle/docs/configuration.rb', line 6

def layout
  @layout
end

#namespaceObject

Returns the value of attribute namespace.



6
7
8
# File 'lib/trifle/docs/configuration.rb', line 6

def namespace
  @namespace
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/trifle/docs/configuration.rb', line 6

def path
  @path
end

#viewsObject

Returns the value of attribute views.



6
7
8
# File 'lib/trifle/docs/configuration.rb', line 6

def views
  @views
end

Instance Method Details

#harvesterObject



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