Class: Arrow::Template::ElsifDirective
- Inherits:
-
AttributeDirective
- Object
- Arrow::Object
- Node
- Directive
- AttributeDirective
- Arrow::Template::ElsifDirective
- Includes:
- ConditionalDirective
- Defined in:
- lib/arrow/template/elsif.rb
Overview
The Arrow::Template::ElsifDirective class, a derivative of Arrow::Template::Directive. This is the class which defines the behaviour of the ‘elsif’ template directive.
Authors
Michael Granger
Please see the file LICENSE in the top-level directory for licensing details.
Constant Summary
- SVNRev =
SVN Revision
%q$Rev$
- SVNId =
SVN Id
%q$Id$
Constants included from ConditionalDirective
Constants inherited from AttributeDirective
Constants inherited from Directive
Constants inherited from Node
Constants included from Arrow::HTMLUtilities
ARRAY_HTML_CONTAINER, HASH_HTML_CONTAINER, HASH_PAIR_HTML, IMMEDIATE_OBJECT_HTML_CONTAINER, IVAR_HTML_FRAGMENT, OBJECT_HTML_CONTAINER, THREAD_DUMP_KEY
Instance Method Summary
-
- (ElsifDirective) initialize(body, parser, state)
constructor
Create a new Arrow::Template::ElsifDirective object.
Methods included from ConditionalDirective
#evaluate, #is_rendering_node?
Methods inherited from AttributeDirective
allows_format?, #before_rendering, #build_rendering_proc, #call_methodchain, #inspect, #is_rendering_node?, #parse_directive_contents, #render, #render_contents, #to_html
Methods inherited from Directive
create, derivativeDirs, #inspect, #parse_directive_contents, #render, #to_html
Methods inherited from Node
#add_to_template, #css_class, #inspect, #is_rendering_node?, #render, #to_a, #to_html, #to_s
Methods included from Arrow::HTMLUtilities
#escape_html, #make_html_for_object, #make_object_html_wrapper
Methods inherited from Arrow::Object
deprecate_class_method, deprecate_method, inherited
Methods included from Arrow::Loggable
Constructor Details
- (ElsifDirective) initialize(body, parser, state)
Create a new Arrow::Template::ElsifDirective object.
32 33 34 35 36 37 38 39 40 |
# File 'lib/arrow/template/elsif.rb', line 32 def initialize( body, parser, state ) unless state.current_branch_node.is_a?( Arrow::Template::ConditionalDirective ) raise Arrow::TemplateError, "elsif outside of conditional directive (%p)" % state.current_branch_node end super end |