Class: Jekyll::GeneratorSingleSource::NavConfig::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll/generator-single-source/nav_config/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ Base

Returns a new instance of Base.



11
12
13
# File 'lib/jekyll/generator-single-source/nav_config/base.rb', line 11

def initialize(file_path)
  @file_path = file_path
end

Class Method Details

.process(file_path) ⇒ Object



7
8
9
# File 'lib/jekyll/generator-single-source/nav_config/base.rb', line 7

def self.process(file_path)
  new(file_path).process
end

Instance Method Details

#processObject



15
16
17
18
19
20
21
# File 'lib/jekyll/generator-single-source/nav_config/base.rb', line 15

def process
  if config.is_a?(Array)
    config
  else
    HashConfig.new(file_path: @file_path, config: config).process
  end
end