Class: Gamefic::Source::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/gamefic/source/text.rb

Instance Method Summary collapse

Constructor Details

#initialize(scripts = {}) ⇒ Text

Returns a new instance of 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