Class: Card::Layout::UnknownLayout

Inherits:
Card::Layout show all
Defined in:
mod/standard/lib/card/layout/unknown_layout.rb

Constant Summary collapse

SCOPE =
"mod.core.format.html_format".freeze

Instance Method Summary collapse

Methods inherited from Card::Layout

built_in_layouts, built_in_layouts_hash, card_layout?, clear_cache, code_layout?, #fetch_main_nest_opts, #initialize, layout_class, layouts, main_nest_opts, #main_nest_opts, register_built_in_layout, register_layout, render

Constructor Details

This class inherits a constructor from Card::Layout

Instance Method Details

#headerObject



10
11
12
# File 'mod/standard/lib/card/layout/unknown_layout.rb', line 10

def header
  @format.(:h1, @format.tr(:unknown_layout, scope: SCOPE, name: @layout))
end

#renderObject



6
7
8
# File 'mod/standard/lib/card/layout/unknown_layout.rb', line 6

def render
  @format.output [header, text]
end

#textObject



14
15
16
17
# File 'mod/standard/lib/card/layout/unknown_layout.rb', line 14

def text
  @format.tr(:available_layouts, scope: SCOPE,
                                 available_layouts: self.class.built_in_layouts)
end