Class: Flex::Tasks
- Inherits:
-
Object
- Object
- Flex::Tasks
- Defined in:
- lib/flex/model_tasks.rb
Direct Known Subclasses
Instance Method Summary collapse
- #config_hash ⇒ Object
-
#original_config_hash ⇒ Object
patches the Flex::Tasks#config_hash so it evaluates also the default mapping for models it modifies also the index:create task.
Instance Method Details
#config_hash ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/flex/model_tasks.rb', line 9 def config_hash @config_hash ||= begin default = {}.extend Struct::Mergeable (Conf.flex_models + Conf.flex_active_models).each do |m| m = eval"::#{m}" if m.is_a?(String) default.deep_merge! m.flex.default_mapping end default.deep_merge(original_config_hash) end end |
#original_config_hash ⇒ Object
patches the Flex::Tasks#config_hash so it evaluates also the default mapping for models it modifies also the index:create task
8 |
# File 'lib/flex/model_tasks.rb', line 8 alias_method :original_config_hash, :config_hash |