Class: Gamefic::Script::Base
- Inherits:
-
Object
- Object
- Gamefic::Script::Base
- Defined in:
- lib/gamefic/script/base.rb
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#absolute_path ⇒ String
Get the absolute path of the script’s original file.
-
#initialize ⇒ Base
constructor
A new instance of Base.
-
#path ⇒ String
Get the script’s path.
-
#read ⇒ String
Get the script’s text.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
4 5 6 |
# File 'lib/gamefic/script/base.rb', line 4 def initialize raise "#initialize must be defined in subclasses" end |
Instance Method Details
#==(other) ⇒ Boolean
28 29 30 |
# File 'lib/gamefic/script/base.rb', line 28 def==(other) path == other.path end |
#absolute_path ⇒ String
Get the absolute path of the script’s original file
23 24 25 |
# File 'lib/gamefic/script/base.rb', line 23 def absolute_path raise "#absolute_path must be defined in subclasses" end |
#path ⇒ String
Get the script’s path
17 18 19 |
# File 'lib/gamefic/script/base.rb', line 17 def path raise "#path must be defined in subclasses" end |
#read ⇒ String
Get the script’s text. The text must be source code suitable for evaluation via Plot#stage.
11 12 13 |
# File 'lib/gamefic/script/base.rb', line 11 def read raise "#read must be defined in subclasses" end |