Module: Card::View::Options

Extended by:
KeyLists
Includes:
VooApi
Included in:
Card::View
Defined in:
lib/card/view/options.rb,
lib/card/view/options/voo_api.rb,
lib/card/view/options/key_lists.rb

Overview

Manages options for card views, including those used in nest syntax

Defined Under Namespace

Modules: KeyLists, VooApi

Class Attribute Summary collapse

Attributes included from VooApi

#normalized_options

Class Method Summary collapse

Methods included from KeyLists

accessible_keys, all_keys, heir_keys, reset_key_lists, shark_keys

Methods included from VooApi

define_getter, define_setter, included, #items, #normalize_cache, #normalize_editor, #normalize_special_options!, #normalize_wrap, #slot_options, #special_option_value

Class Attribute Details

.keymapObject (readonly)

Returns the value of attribute keymap.



60
61
62
# File 'lib/card/view/options.rb', line 60

def keymap
  @keymap
end

Class Method Details

.add_option(name, type) ⇒ Object



62
63
64
65
66
67
# File 'lib/card/view/options.rb', line 62

def add_option name, type
  raise "invalid option type: #{type}" unless @keymap.key?(type)

  @keymap[type] << name
  reset_key_lists
end