Class: TyranoDsl::ExportText::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/tyrano_dsl/export_text/main.rb

Instance Method Summary collapse

Instance Method Details

#apply(content, _tyrano_project_path) ⇒ void

This method returns an undefined value.

Parameters:

  • content (Array<String>)
  • _tyrano_project_path (String)


20
21
22
23
24
25
# File 'lib/tyrano_dsl/export_text/main.rb', line 20

def apply(content, _tyrano_project_path)
  STDOUT << "\n\nGame content :\n"
  content.each do |entry|
    STDOUT << entry
  end
end

#run(file_path) ⇒ Array<String>

Parameters:

  • file_path (String)

    path to the DSL file

Returns:

  • (Array<String>)


12
13
14
15
# File 'lib/tyrano_dsl/export_text/main.rb', line 12

def run(file_path)
  parsing_context = TyranoDsl::Parser.parse(file_path)
  TyranoDsl::ExportText::Writer.new.write(parsing_context.words)
end