Class: Card::Layout::UnknownLayout

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

Instance Method Summary collapse

Methods inherited from Card::Layout

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

Constructor Details

This class inherits a constructor from Card::Layout

Instance Method Details

#headerObject



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

def header
  @format. :h1, t(:layout_unknown_layout, name: @layout)
end

#renderObject



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

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

#textObject



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

def text
  t :layout_available_layouts, available_layouts: self.class.built_in_layouts
end