Class: ActiveInteraction::Base
- Inherits:
-
Object
- Object
- ActiveInteraction::Base
- Defined in:
- lib/mtk_framework/gem_extensions/active_interaction/base.rb,
lib/mtk_framework/gem_extensions/active_interaction/filters/tz_account_filter.rb,
lib/mtk_framework/gem_extensions/active_interaction/filters/tz_operation_filter.rb,
lib/mtk_framework/gem_extensions/active_interaction/filters/tz_signature_filter.rb,
lib/mtk_framework/gem_extensions/active_interaction/filters/tz_public_key_filter.rb,
lib/mtk_framework/gem_extensions/active_interaction/filters/tz_secret_key_filter.rb,
lib/mtk_framework/gem_extensions/active_interaction/filters/tz_contract_address_filter.rb
Class Method Summary collapse
Class Method Details
.import_filters_optionally(klass, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mtk_framework/gem_extensions/active_interaction/base.rb', line 5 def self.import_filters_optionally(klass, = {}) only = [:only] except = [:except] default_value = [:default_value] other_filters = klass.filters.dup other_filters.select! { |k, _| [*only].include?(k) } if only other_filters.reject! { |k, _| [*except].include?(k) } if except other_filters.each_value do |filter| filter.[:default] = default_value initialize_filter(filter) end end |