Module: Psychgus::Stylables::SeqFlowStylable
- Includes:
- StyleStylable
- Defined in:
- lib/psychgus/stylables.rb
Overview
A FLOW style changer for Sequences only.
Constant Summary
Constants included from Psychgus::Styler
Instance Attribute Summary
Attributes included from StyleStylable
Instance Method Summary collapse
-
#initialize(min_level = 0, new_style: nil, **kargs) ⇒ Object
max_level
is not defined because a parent’s style will override all of its children. -
#style_sequence(sniffer, node) ⇒ Object
Change the style of a Sequence to FLOW (or to the value of Psychgus::Stylables::StyleStylable#new_style) if it is >= Psychgus::Stylables::StyleStylable#min_level.
Methods included from StyleStylable
Methods included from Psychgus::Styler
#style, #style_alias, #style_document, #style_mapping, #style_scalar, #style_stream
Instance Method Details
#initialize(min_level = 0, new_style: nil, **kargs) ⇒ Object
max_level
is not defined because a parent’s style will override all of its children.
If new_style
is nil (the default), then Psychgus::SEQUENCE_FLOW will be used.
242 243 244 245 246 |
# File 'lib/psychgus/stylables.rb', line 242 def initialize(*) super @new_style = SEQUENCE_FLOW if @new_style.nil? end |
#style_sequence(sniffer, node) ⇒ Object
Change the style of a Sequence to FLOW (or to the value of Psychgus::Stylables::StyleStylable#new_style) if it is >= Psychgus::Stylables::StyleStylable#min_level.
253 254 255 |
# File 'lib/psychgus/stylables.rb', line 253 def style_sequence(sniffer,node) change_style(sniffer,node) end |