Class: Markdowndocs::Configuration
- Inherits:
-
Object
- Object
- Markdowndocs::Configuration
- Defined in:
- lib/markdowndocs/configuration.rb
Instance Attribute Summary collapse
-
#cache_expiry ⇒ Object
Returns the value of attribute cache_expiry.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#default_mode ⇒ Object
Returns the value of attribute default_mode.
-
#docs_path ⇒ Object
Returns the value of attribute docs_path.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#markdown_options ⇒ Object
Returns the value of attribute markdown_options.
-
#modes ⇒ Object
Returns the value of attribute modes.
-
#rouge_theme ⇒ Object
Returns the value of attribute rouge_theme.
-
#search_enabled ⇒ Object
Returns the value of attribute search_enabled.
-
#user_mode_resolver ⇒ Object
Returns the value of attribute user_mode_resolver.
-
#user_mode_saver ⇒ Object
Returns the value of attribute user_mode_saver.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#resolved_docs_path ⇒ Object
Lazily resolve docs_path so Rails.root is available.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/markdowndocs/configuration.rb', line 10 def initialize @docs_path = nil # Resolved lazily so Rails.root is available @categories = {} @modes = %w[guide technical] @default_mode = "guide" @markdown_options = @rouge_theme = "github" @cache_expiry = 1.hour @user_mode_resolver = nil @user_mode_saver = nil @search_enabled = false @layout = "markdowndocs/application" end |
Instance Attribute Details
#cache_expiry ⇒ Object
Returns the value of attribute cache_expiry.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def cache_expiry @cache_expiry end |
#categories ⇒ Object
Returns the value of attribute categories.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def categories @categories end |
#default_mode ⇒ Object
Returns the value of attribute default_mode.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def default_mode @default_mode end |
#docs_path ⇒ Object
Returns the value of attribute docs_path.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def docs_path @docs_path end |
#layout ⇒ Object
Returns the value of attribute layout.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def layout @layout end |
#markdown_options ⇒ Object
Returns the value of attribute markdown_options.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def @markdown_options end |
#modes ⇒ Object
Returns the value of attribute modes.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def modes @modes end |
#rouge_theme ⇒ Object
Returns the value of attribute rouge_theme.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def rouge_theme @rouge_theme end |
#search_enabled ⇒ Object
Returns the value of attribute search_enabled.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def search_enabled @search_enabled end |
#user_mode_resolver ⇒ Object
Returns the value of attribute user_mode_resolver.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def user_mode_resolver @user_mode_resolver end |
#user_mode_saver ⇒ Object
Returns the value of attribute user_mode_saver.
5 6 7 |
# File 'lib/markdowndocs/configuration.rb', line 5 def user_mode_saver @user_mode_saver end |
Instance Method Details
#resolved_docs_path ⇒ Object
Lazily resolve docs_path so Rails.root is available
25 26 27 |
# File 'lib/markdowndocs/configuration.rb', line 25 def resolved_docs_path @docs_path || Rails.root.join("app", "docs") end |