Class: StoryTeller::Runtime

Inherits:
Object
  • #Object
show all
Extended by:
ClassMethods
Includes:
Game::Loader, IO, InstanceMethods, Publisher
Defined in:
lib/story_teller/runtime.rb

Overview

A Runtime runs a story game.

Constant Summary

Constants included from Game::Loader

Game::Loader::EnsureFirst, Game::Loader::GrammarParsedInfoMessage, Game::Loader::PreGameComponents

Constants included from InstanceMethods

InstanceMethods::UndefinedMainPattern

Instance Attribute Summary collapse

Attributes included from InstanceMethods

#main_object, #session

Instance Method Summary collapse

Methods included from ClassMethods

game_saves_dir_path, instance, project_dir_path

Methods included from Game::Loader

#first_orphan_object_with_description_that_has_light, #game_files, #game_serial, #grammar_files, #handle_load_failure, #load_game, #load_game_files, #load_game_files_with_committing, #load_game_files_without_committing, #load_game_states, #load_game_sub, #load_game_subcomponents, #load_grammars, #load_library, #load_path=, #post_game_components, #pre_game_components, #preserve_persisted_world?, #prioritize_if, #refresh_preserved_world_object, #refresh_preserved_world_objects, #release, #reload_game, #reset_constants, #same_path?, #top_level_game_path

Methods included from InstanceMethods

#apply_invocation_privileges, #apply_privileges, #bind_session, #canonical_location_candidate, #config_file_path, #configure!, #configure_output, #default_config, #ensuring_player_location, #flush_session_output, #game_components, #game_dir_name, #game_file_path, #game_path, #grammar_module_path, #identity, #inform_library, #inspect, #install_persisted_startup_location_hook, #invocation_context, #invocation_identity, #invocation_properties, #invoke_main, #location_candidate, #manage_privileges, #persist?, #persisted_location_candidate, #persistence, #play_game, #privileged_identities, #project_dir_path, #quit_game, #read, #read_eval_print_loop, #reset_config_cache, #restart_game, #restore_game, #restore_player_location, #save_game, #to_s, #use_persistent_selfobj, #write_output

Constructor Details

#initialize(options = StoryTeller::Config.defaults) ⇒ Runtime

Returns a new instance of Runtime.



375
376
377
378
# File 'lib/story_teller/runtime.rb', line 375

def initialize(options = StoryTeller::Config.defaults)
  @options = {}
  configure!(options)
end

Instance Attribute Details

#gameObject (readonly)

Returns the value of attribute game.



373
374
375
# File 'lib/story_teller/runtime.rb', line 373

def game
  @game
end

#optionsObject (readonly)

Returns the value of attribute options.



373
374
375
# File 'lib/story_teller/runtime.rb', line 373

def options
  @options
end