Class: JekyllSupport::OutlineOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/structure/outline.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection_name: '_posts', attribution: '', enable_attribution: false, logger: PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config), pattern: '<b> title </b> &ndash; <i> description </i>', sort_by: :order) ⇒ OutlineOptions

Returns a new instance of OutlineOptions.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/structure/outline.rb', line 13

def initialize(
  collection_name: '_posts',
  attribution: '',
  enable_attribution: false,
  logger: PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config),
  pattern: '<b> title </b> &ndash; <i> description </i>',
  sort_by: :order
)
  @attribution = attribution
  @enable_attribution = enable_attribution
  @collection_name = collection_name
  @logger = logger
  @pattern = pattern
  @sort_by = sort_by

  @die_if_order_field_missing = true # TODO: parse this from a new option
end

Instance Attribute Details

#attributionObject

Returns the value of attribute attribution.



11
12
13
# File 'lib/structure/outline.rb', line 11

def attribution
  @attribution
end

#collection_nameObject

Returns the value of attribute collection_name.



11
12
13
# File 'lib/structure/outline.rb', line 11

def collection_name
  @collection_name
end

#enable_attributionObject

Returns the value of attribute enable_attribution.



11
12
13
# File 'lib/structure/outline.rb', line 11

def enable_attribution
  @enable_attribution
end

#loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/structure/outline.rb', line 11

def logger
  @logger
end

#patternObject

Returns the value of attribute pattern.



11
12
13
# File 'lib/structure/outline.rb', line 11

def pattern
  @pattern
end

#sort_byObject

Returns the value of attribute sort_by.



11
12
13
# File 'lib/structure/outline.rb', line 11

def sort_by
  @sort_by
end