# File lib/rabbit/theme-configuration.rb, line 91 def gem_name "#{GEM_NAME_PREFIX}-#{@id}" end
# File lib/rabbit/theme-configuration.rb, line 43 def load return unless File.exist?(path) conf = YAML.load(File.read(path)) merge!(conf) rescue format = _("Failed to read slide configuration: %s: %s") @logger.error(format % [path, $!.message]) end
# File lib/rabbit/theme-configuration.rb, line 62 def merge!(conf) @id = conf["id"] @tags = conf["tags"] @version = conf["version"] @licenses = conf["licenses"] @author = AuthorConfiguration.new(@logger) @author.merge!(conf["author"] || {}) end
# File lib/rabbit/theme-configuration.rb, line 95 def path "config.yaml" end
# File lib/rabbit/theme-configuration.rb, line 52 def save(base_dir) config_path = File.join(base_dir, path) create_file(config_path) do |conf_file| conf_file.print(to_yaml) end rescue format = _("Failed to write slide configuration: %s: %s") @logger.error(format % [config_path, $!.message]) end
# File lib/rabbit/theme-configuration.rb, line 72 def to_hash config = { "id" => @id, "tags" => @tags, "version" => version, "licenses" => @licenses, } config["author"] = @author.to_hash if @author config end
Generated with the Darkfish Rdoc Generator 2.