Class: Hypertext::DSL
- Inherits:
-
Object
- Object
- Hypertext::DSL
- Defined in:
- lib/hypertext/dsl.rb
Constant Summary collapse
- TAGS =
[:a, :abbr, :address, :area, :article, :aside, :audio, :b, :base, :bdi, :bdo, :blockquote, :body, :br, :button, :canvas, :caption, :cite, :code, :col, :colgroup, :data, :datalist, :dd, :del, :details, :dfn, :dialog, :div, :dl, :dt, :em, :embed, :fieldset, :figcaption, :figure, :footer, :form, :h1, :h2, :h3, :h4, :h5, :h6, :head, :header, :hgroup, :hr, :html, :i, :iframe, :img, :input, :ins, :kbd, :label, :legend, :li, :link, :main, :map, :mark, :meta, :meter, :nav, :noscript, :object, :ol, :optgroup, :option, :output, :p, :param, :picture, :pre, :progress, :q, :rb, :rp, :rt, :rtc, :ruby, :s, :samp, :script, :section, :select, :slot, :small, :source, :span, :strong, :style, :sub, :summary, :sup, :table, :tbody, :td, :template, :textarea, :tfoot, :th, :thead, :time, :title, :tr, :track, :u, :ul, :var, :video, :wbr]
Instance Method Summary collapse
- #append(content) ⇒ Object
-
#initialize(&block) ⇒ DSL
constructor
A new instance of DSL.
- #text(content) ⇒ Object
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(&block) ⇒ DSL
41 42 43 44 |
# File 'lib/hypertext/dsl.rb', line 41 def initialize(&block) @ht = Hypertext.new instance_eval(&block) end |
Instance Method Details
#append(content) ⇒ Object
52 53 54 |
# File 'lib/hypertext/dsl.rb', line 52 def append(content) @ht.append(content) end |
#text(content) ⇒ Object
56 57 58 |
# File 'lib/hypertext/dsl.rb', line 56 def text(content) @ht.text(content) end |
#to_a ⇒ Object
60 61 62 |
# File 'lib/hypertext/dsl.rb', line 60 def to_a @ht.to_a end |
#to_s ⇒ Object
64 65 66 |
# File 'lib/hypertext/dsl.rb', line 64 def to_s @ht.to_s end |