class Card::Format::HtmlFormat
Main Format class for formatting card views in HTML
Attributes
options_need_save[RW]
skip_autosave[RW]
start_time[RW]
Public Instance Methods
default_item_view()
click to toggle source
# File lib/card/format/html_format.rb, line 26 def default_item_view :bar end
default_nest_view()
click to toggle source
# File lib/card/format/html_format.rb, line 21 def default_nest_view # FIXME: not sure this makes sense as a rule... card.rule(:default_html_view) || :titled end
escape_literal(literal)
click to toggle source
# File lib/card/format/html_format.rb, line 30 def escape_literal literal "<span>#{literal}</span>" end
final_render_call(method)
click to toggle source
Calls superclass method
# File lib/card/format/html_format.rb, line 38 def final_render_call method rendered = super rendered.is_a?(Array) ? output(rendered) : rendered end
focal?()
click to toggle source
is the current card the requested card?
# File lib/card/format/html_format.rb, line 17 def focal? @focal ||= show_layout? ? main? : depth.zero? end
main?()
click to toggle source
# File lib/card/format/html_format.rb, line 12 def main? !@main.nil? end
mime_type()
click to toggle source
# File lib/card/format/html_format.rb, line 34 def mime_type "text/html" end
stylesheet_link_tag(path)
click to toggle source
# File lib/card/format/html_format.rb, line 43 def stylesheet_link_tag path tag "link", href: path, media: "all", rel: "stylesheet", type: "text/css" end