lib/reality/describers/wikidata/actions/base.rb
# Make new action, with additional params passed as `hash`. No params validations are made.
#
# @param hash [Hash] Params to merge. All keys and values would be stringified.
# @return [Action] Produced action of the same type as current action was, with all passed
#   params applied.
Make new action, with additional params passed as `hash`. No params validations are made.
Make new action with additional params passed as ` hash ` . No params validations are made .
def merge(hash)
        replace = hash.fetch(:replace, true)
        hash.delete(:replace)
        self.class
            .new(@client, @params.merge(stringify_hash(hash)) { |_, o, n| replace ? n : [o, n].compact.uniq.join('|') })
            .tap { |action| @submodules.each { |sm| action.submodule(sm) } }
      end
def merge ( hash ) replace = hash . fetch ( :replace , true ) hash . delete ( :replace ) self . class . new ( @client , @params . merge ( stringify_hash ( hash ) ) { | _ , o , n | replace ? n : [ o , n ] . compact . uniq . join ( '|' ) } ) . tap { | action | @submodules . each { | sm | action . submodule ( sm ) } } end
Make new action, with additional params passed as `hash`.
Make new action with additional params passed as ` hash ` .
Produced action of the same type as current action was, with all passed params applied.
Produced action of the same type as current action was with all passed params applied .
Action
hash
Params to merge. All keys and values would be stringified.
Params to merge . All keys and values would be stringified .