Sha256: bee7fef87fdd931abce2854987f59b4efb3185ef8ea72f9976b18dab5b513543
Contents?: true
Size: 710 Bytes
Versions: 10
Compression:
Stored size: 710 Bytes
Contents
require 'yaml' module Gamefic::Sdk class PlotConfig attr_reader :author, :title, :script_paths, :media_paths def initialize filename = nil @script_paths = [] @media_paths = [] if !filename.nil? config = YAML.load_file filename base_dir = File.dirname(filename) @author = config['author'] @title = config['title'] config['script_paths'].each { |p| @script_paths.push File.absolute_path(p, base_dir) } if !config['script_paths'].nil? config['media_paths'].map! { |p| @media_paths.push File.absolute_path(p, base_dir) } if !config['media_paths'].nil? end end end end
Version data entries
10 entries across 10 versions & 1 rubygems