class Bookbinder::Config::SectionConfig
Attributes
config[R]
Public Class Methods
new(config)
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 6 def initialize(config) @config = config end
Public Instance Methods
==(other)
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 56 def ==(other) config == other.instance_variable_get(:@config) end
at_repo_path()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 38 def at_repo_path repo['at_path'] end
dependent_sections()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 46 def dependent_sections @sections ||= (config['dependent_sections'] || []).map do |dep_section| SectionConfig.new(dep_section) end end
desired_directory_name()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 18 def desired_directory_name config['directory'] end
inspect()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 64 def inspect config.inspect end
merge(other_section_config)
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 60 def merge(other_section_config) SectionConfig.new(config.merge(other_section_config.instance_variable_get(:@config))) end
no_docs?()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 42 def no_docs? config.fetch('no_docs', false) end
pdf_output_filename()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 22 def pdf_output_filename config['output_filename'] end
preprocessor_config()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 52 def preprocessor_config config.fetch('preprocessor_config', {}) end
product_id()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 14 def product_id config['product_id'] end
Also aliased as: subnav_name
product_info()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 70 def product_info return {} if config['product_info'].nil? config['product_info'] end
repo_name()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 26 def repo_name repo['name'] end
repo_ref()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 34 def repo_ref repo['ref'] || 'master' end
repo_url()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 30 def repo_url Ingest::RepoIdentifier.new(repo['name']) end
Private Instance Methods
repo()
click to toggle source
# File lib/bookbinder/config/section_config.rb, line 77 def repo config.fetch('repository', {}) end