Class: Deplate::Input::Play
- Inherits:
-
Deplate::Input
- Object
- Deplate::Input
- Deplate::Input::Play
- Defined in:
- lib/deplate/input/play.rb
Overview
require ‘deplate/input/deplate.rb’
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(deplate, args) ⇒ Play
constructor
A new instance of Play.
Constructor Details
#initialize(deplate, args) ⇒ Play
Returns a new instance of Play.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/deplate/input/play.rb', line 20 def initialize(deplate, args) # deplate.log('WARNING: The play class is in flux and will most likely change', :anyway) args_fill_with_default(args) args[:elements] = [ Deplate::Element::Command, Deplate::Element::Region, Deplate::Input::Play::Heading, Deplate::Input::Play::Directive, Deplate::Input::Play::Dialog, Deplate::Element::Anchor, Deplate::Element::Table, Deplate::Element::Whitespace, ] args[:commands] = Deplate::Command.commands args[:commands]['ACT'] = Deplate::Input::Play::ACT args[:commands]['CAST'] = Deplate::Input::Play::CAST # args[:particles] = Deplate::Particle.particles + [ # Deplate::Input::Play::Direct, # ] args[:particles] = [ Deplate::Input::Play::Direct, ] + Deplate::Particle.particles args[:paragraph_class] = Deplate::Input::Play::General super end |
Class Method Details
.styled_text(style, text) ⇒ Object
15 16 17 |
# File 'lib/deplate/input/play.rb', line 15 def styled_text(style, text) "{text style=#{style}: #{Deplate::Core.escape_characters(text, :esc => '{}')}}" end |