Class: Ixtlan::Babel::FilterConfig
- Inherits:
-
Object
- Object
- Ixtlan::Babel::FilterConfig
- Defined in:
- lib/ixtlan/babel/filter_config.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
Returns the value of attribute root.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, options) ⇒ Object
- #collection_options(context_or_options) ⇒ Object
- #default_context_key(single = :single, collection = :collection) ⇒ Object
- #single_options(context_or_options) ⇒ Object
Instance Attribute Details
#root ⇒ Object
Returns the value of attribute root.
68 69 70 |
# File 'lib/ixtlan/babel/filter_config.rb', line 68 def root @root end |
Instance Method Details
#[](key) ⇒ Object
56 57 58 |
# File 'lib/ixtlan/babel/filter_config.rb', line 56 def []( key ) context[ key.to_sym ] if key end |
#[]=(key, options) ⇒ Object
52 53 54 |
# File 'lib/ixtlan/babel/filter_config.rb', line 52 def []=( key, ) context[ key.to_sym ] = if key end |
#collection_options(context_or_options) ⇒ Object
64 65 66 |
# File 'lib/ixtlan/babel/filter_config.rb', line 64 def ( ) ( ) || context[ default_context_key[ 1 ] ] || {} end |
#default_context_key(single = :single, collection = :collection) ⇒ Object
47 48 49 50 |
# File 'lib/ixtlan/babel/filter_config.rb', line 47 def default_context_key( single = :single, collection = :collection ) @single, @collection = single, collection end |
#single_options(context_or_options) ⇒ Object
60 61 62 |
# File 'lib/ixtlan/babel/filter_config.rb', line 60 def ( ) ( ) || context[ default_context_key[ 0 ] ] || {} end |