Sha256: ff47713693da06e4209eade6709d7bba33c173f32568382431059ece5530983b
Contents?: true
Size: 991 Bytes
Versions: 41
Compression:
Stored size: 991 Bytes
Contents
class Card class Format module Nesting # Handle the main nest module Main def wrap_main yield # no wrapping in base format end def main_nest opts wrap_main do main.rendered || main_nest_render(opts) end end def main_nest_render opts={} with_nest_mode :normal do if block_given? block.call else nest root.card, opts.merge(main_view: true, main: true) end end end def main_nest? nest_name nest_name == "_main" # && !root.already_mained? end def already_mained? return true if @main || @already_main @already_main = true false end def main! @main = true end # view=edit&items=closed def main_nest_options inherit(:main_opts) || {} end end end end end
Version data entries
41 entries across 41 versions & 1 rubygems