Module: Card::Set::All::RichHtml::Title::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
tmpsets/set/mod021-standard/all/rich_html/title.rb

Instance Method Summary collapse

Instance Method Details

#safe_nameObject



35
36
37
# File 'tmpsets/set/mod021-standard/all/rich_html/title.rb', line 35

def safe_name
  h super
end

#title_in_context(title = nil) ⇒ Object



39
40
41
42
43
# File 'tmpsets/set/mod021-standard/all/rich_html/title.rb', line 39

def title_in_context title=nil
  title = title&.html_safe
  # escape titles generated from card names, but not those set explicitly
  h super(title)
end


31
32
33
# File 'tmpsets/set/mod021-standard/all/rich_html/title.rb', line 31

def title_with_link link_text
  link_to_card card.name, link_text
end

#wrapped_jointObject



51
52
53
# File 'tmpsets/set/mod021-standard/all/rich_html/title.rb', line 51

def wrapped_joint
  wrap_with :span, "+", classy("joint")
end

#wrapped_title(title) ⇒ Object



45
46
47
48
49
# File 'tmpsets/set/mod021-standard/all/rich_html/title.rb', line 45

def wrapped_title title
  wrap_with :span, class: classy("card-title"), title: title do
    title.to_name.parts.join wrapped_joint
  end
end