module Rabbit::Format::SpanTextFormatter

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/rabbit/formatter.rb, line 33
def initialize(value)
  @value = value
end

Public Instance Methods

format(text) click to toggle source
# File lib/rabbit/formatter.rb, line 45
def format(text)
  tagged_text(text, "span", {name => pango_value})
end
html_format(text) click to toggle source
# File lib/rabbit/formatter.rb, line 49
def html_format(text)
  tagged_text(text, "span", {'style' => "#{css_name}: #{css_value};"})
end
html_formatter?() click to toggle source
# File lib/rabbit/formatter.rb, line 41
def html_formatter?
  true
end
pango_value() click to toggle source
# File lib/rabbit/formatter.rb, line 53
def pango_value
  @value
end
text_formatter?() click to toggle source
# File lib/rabbit/formatter.rb, line 37
def text_formatter?
  true
end

Private Instance Methods

css_name() click to toggle source
# File lib/rabbit/formatter.rb, line 58
def css_name
  name
end
css_value() click to toggle source
# File lib/rabbit/formatter.rb, line 62
def css_value
  value
end