Class: Gamefic::Source::Text
Instance Method Summary collapse
- #export(path) ⇒ Object
-
#initialize(scripts = {}) ⇒ Text
constructor
A new instance of Text.
Constructor Details
#initialize(scripts = {}) ⇒ Text
4 5 6 |
# File 'lib/gamefic/source/text.rb', line 4 def initialize scripts = {} @scripts = scripts end |
Instance Method Details
#export(path) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/gamefic/source/text.rb', line 7 def export path if @scripts.has_key?(path) Script::Text.new(path, @scripts[path]) else raise "Script #{path} not found" end end |