Module: TyranoDsl::ParsingWords::SetBackground

Includes:
ParsingWordsModule
Defined in:
lib/tyrano_dsl/parsing_words/set_background.rb

Instance Method Summary collapse

Instance Method Details

#set_background(background_name) ⇒ void

This method returns an undefined value.

Parameters:

  • background_name (String)

Raises:



11
12
13
14
15
16
17
18
19
# File 'lib/tyrano_dsl/parsing_words/set_background.rb', line 11

def set_background(background_name)
  unless context.world.backgrounds.key? background_name
    raise_unknown('background', background_name, context.world.backgrounds.keys)
  end
  add_parsed_word(
      TyranoDsl::Vocabulary::SET_BACKGROUND,
      name: background_name
  )
end