Module: StoryTeller::ClassMethods
- Included in:
- Runtime
- Defined in:
- lib/story_teller/runtime.rb
Overview
module ClassMethods
Instance Method Summary collapse
Instance Method Details
#game_saves_dir_path ⇒ Object
350 351 352 353 354 |
# File 'lib/story_teller/runtime.rb', line 350 def game_saves_dir_path File.join( StoryTeller::Runtime.project_dir_path, '.' + StoryTeller::Game.config[:game_name] + '_saves') end |
#instance(options = nil) ⇒ Object
356 357 358 359 |
# File 'lib/story_teller/runtime.rb', line 356 def instance( = nil) @instance ||= new(StoryTeller::Config.defaults) @instance.tap { |obj| obj.configure!() unless .nil? } end |
#project_dir_path ⇒ Object
342 343 344 345 346 347 348 |
# File 'lib/story_teller/runtime.rb', line 342 def project_dir_path @project_dir_path ||= begin story_dir_path = File.(__dir__) lib_dir_path = File.(File.dirname(story_dir_path)) File.(File.dirname(lib_dir_path)) end end |