Class: Tml::Tokens::XMessage::Map
- Defined in:
- lib/tml/tokens/x_message/map.rb
Overview
Map Token
0 tagged himself/herself in 1,choice,singular1,choice,singular#{1,number 2,map,photo2,map,photo#photo|video2,map,photo#photo|video#video|plural#1,number 2,map,photo2,map,photo#photos|video2,map,photo#photos|video#videos}.
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Attributes inherited from Data
#case_keys, #context_keys, #full_name, #label, #short_name
Instance Method Summary collapse
-
#initialize(label, opts) ⇒ Map
constructor
A new instance of Map.
Methods inherited from Data
#apply_case, #apply_language_cases, #context_for_language, #decorate, #decoration_name, #error, expression, #key, #language_cases_enabled?, #name, #name_for_case_keys, parse, #parse_elements, #sanitize, #sanitized_name, #substitute, #to_s, #token_object, token_object, #token_value, #token_value_from_array_param, #token_value_from_hash_param, #token_values_from_array
Constructor Details
#initialize(label, opts) ⇒ Map
Returns a new instance of Map.
45 46 47 48 49 50 51 52 |
# File 'lib/tml/tokens/x_message/map.rb', line 45 def initialize(label, opts) @label = label @short_name = opts[:index] @full_name = "{#{@short_name}}" @params = opts[:styles].collect{|style| style[:key]} @case_keys = [] @context_keys = [] end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
43 44 45 |
# File 'lib/tml/tokens/x_message/map.rb', line 43 def params @params end |