Class: Jekyll::AgentMarkdown::DocumentSettings
- Inherits:
-
Object
- Object
- Jekyll::AgentMarkdown::DocumentSettings
- Defined in:
- lib/jekyll/agent_markdown/document_settings.rb
Constant Summary collapse
- ALLOWED_SETTINGS =
%w[export index section optional include_document_header].freeze
Instance Attribute Summary collapse
-
#section ⇒ Object
readonly
Returns the value of attribute section.
Instance Method Summary collapse
- #export? ⇒ Boolean
- #include_document_header? ⇒ Boolean
- #index? ⇒ Boolean
-
#initialize(document, settings, source_kind:, collection_name: nil) ⇒ DocumentSettings
constructor
A new instance of DocumentSettings.
- #optional? ⇒ Boolean
Constructor Details
#initialize(document, settings, source_kind:, collection_name: nil) ⇒ DocumentSettings
Returns a new instance of DocumentSettings.
13 14 15 16 17 18 19 20 |
# File 'lib/jekyll/agent_markdown/document_settings.rb', line 13 def initialize(document, settings, source_kind:, collection_name: nil) @document = document @settings = settings @source_kind = SourceSettings.kind(source_kind, document_path) @collection_name = SourceSettings.collection_name(collection_name, @source_kind, document_path) apply(normalized_document_settings) end |
Instance Attribute Details
#section ⇒ Object (readonly)
Returns the value of attribute section.
11 12 13 |
# File 'lib/jekyll/agent_markdown/document_settings.rb', line 11 def section @section end |
Instance Method Details
#export? ⇒ Boolean
22 |
# File 'lib/jekyll/agent_markdown/document_settings.rb', line 22 def export? = @export |
#include_document_header? ⇒ Boolean
28 |
# File 'lib/jekyll/agent_markdown/document_settings.rb', line 28 def include_document_header? = @include_document_header |
#index? ⇒ Boolean
24 |
# File 'lib/jekyll/agent_markdown/document_settings.rb', line 24 def index? = @index |
#optional? ⇒ Boolean
26 |
# File 'lib/jekyll/agent_markdown/document_settings.rb', line 26 def optional? = @optional |