class BuildConfig
For now BuildConfig
is mostly to objectify the primary build 'action' steps
Public Class Methods
new(config)
click to toggle source
# File lib/liquidoc.rb, line 295 def initialize config if (defined?(config['compile'][0])) # The config is formatted for vesions < 0.3.0; convert it config = deprecated_format(config) end # validations unless config.is_a? Array raise "ConfigStructError" end @cfg = config end
Public Instance Methods
deprecated_format(config)
click to toggle source
# File lib/liquidoc.rb, line 313 def deprecated_format config # for backward compatibility with 0.1.0 and 0.2.0 puts "You are using a deprecated configuration file structure. Update your config files; support for this structure will be dropped in version 1.0.0." # There's only ever one item in the 'compile' array, and only one action type ("parse") config['compile'].each do |n| n.merge!("action" => "parse") # the action type was not previously declared end return config['compile'] end
steps()
click to toggle source
# File lib/liquidoc.rb, line 309 def steps @cfg end