Class: Brandish::Processors::HTML::Group
- Inherits:
-
Common::Group
- Object
- Brandish::Processor::Base
- Common::Group
- Brandish::Processors::HTML::Group
- Includes:
- Brandish::Processor::Block, Hanami::Helpers::EscapeHelper, Hanami::Helpers::HtmlHelper
- Defined in:
- lib/brandish/processors/html/group.rb
Overview
A "group." This is used for grouping together elements for styling,
like the "div" element in HTML. This uses div
as one of the
element names, but that doesn't mean that it includes all of the same
attributes. This accepts the "class"
, "id"
, and "name"
headers.
Instance Attribute Summary
Attributes inherited from Brandish::Processor::Base
Instance Method Summary collapse
-
#perform ⇒ ::String
Creates a div element with the proper class and id values.
Methods included from Brandish::Processor::Block
Methods inherited from Common::Group
#accepted_body, #class_value, #id_value, #name_value
Methods inherited from Brandish::Processor::Base
#accept, #call, #initialize, #postprocess, #process_block, #process_command, #process_root, #process_text, register, #setup
Constructor Details
This class inherits a constructor from Brandish::Processor::Base
Instance Method Details
#perform ⇒ ::String
Creates a div element with the proper class and id values. This currently ignores the name value.
27 28 29 |
# File 'lib/brandish/processors/html/group.rb', line 27 def perform html.div(raw(accepted_body), class: class_value, id: id_value).to_s end |