Class: TyranoDsl::ElementsWriters::CharacterWriter
- Inherits:
-
Object
- Object
- TyranoDsl::ElementsWriters::CharacterWriter
- Includes:
- ElementsWritersModule
- Defined in:
- lib/tyrano_dsl/elements_writers/character_writer.rb
Overview
Write a character
Instance Method Summary collapse
Instance Method Details
#init_actions ⇒ Array
12 13 14 15 16 |
# File 'lib/tyrano_dsl/elements_writers/character_writer.rb', line 12 def init_actions [ TyranoDsl::FileActions::ClearDirectory.new(TyranoDsl::Elements::Character::CHARACTER_DIRECTORY) ] end |
#write(character) ⇒ Array
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/tyrano_dsl/elements_writers/character_writer.rb', line 20 def write(character) log {"Writing character [#{character.name}]"} result = [] character.stances.each_value do |stance| result << TyranoDsl::FileActions::FileCopy.new( stance.original_file_name, stance.long_target_file_name ) end result end |