Module: Kinko::Adapters::ROM::Plugin::InstanceMethods
- Defined in:
- lib/kinko/adapters/rom/plugin.rb
Instance Method Summary collapse
Instance Method Details
#command(type) ⇒ Object
95 96 97 98 99 100 101 102 |
# File 'lib/kinko/adapters/rom/plugin.rb', line 95 def command(type, **) cmd = super config = self.class.kinko_config return cmd unless config && %i[create update].include?(type) base_input = cmd.input cmd.with(input: ->(tuple) { base_input[config.encrypt_input(tuple)] }) end |
#each(&block) ⇒ Object
104 105 106 107 108 109 |
# File 'lib/kinko/adapters/rom/plugin.rb', line 104 def each(&block) config = self.class.kinko_config return super unless config && block_given? super { block.call(config.decrypt_output(_1)) } end |