Module: Rabbit::Format::Formatter

Includes:
ERB::Util
Included in:
ConvenienceTextFormatter, SpanTextFormatter, ValueContainerFormatter
Defined in:
lib/rabbit/formatter.rb

Instance Method Summary collapse

Instance Method Details

#html_formatter?Boolean

Returns:

  • (Boolean)

16
17
18
# File 'lib/rabbit/formatter.rb', line 16

def html_formatter?
  false
end

#tagged_text(text, name, attrs) ⇒ Object


20
21
22
23
24
25
# File 'lib/rabbit/formatter.rb', line 20

def tagged_text(text, name, attrs)
  attrs = attrs.collect do |key, value|
    %Q[ #{h(key)}="#{h(value)}"]
  end.join("")
  "<#{name}#{attrs}>#{text}</#{name}>"
end

#text_formatter?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'lib/rabbit/formatter.rb', line 12

def text_formatter?
  false
end