lib/locomotive/liquid/drops/content_types.rb
# Change the value of a key of the with_scope depending of its type.
# If the key is a Origin::Key, we only change the name.
# If the key is a String, we replace it.
#
# @param [ Object ] key Either a String or a Origin::Key
# @param [ String ] name The new name of the key
# @param [ String ] value The new value associated to the key
#
Change the value of a key of the with_scope depending of its type.
If the key is a Origin::Key, we only change the name.
If the key is a String, we replace it.
Change the value of a key of the with_scope depending of its type . If the key is a Origin :: Key we only change the name . If the key is a String we replace it .
def modify_with_scope_key(key, name, value)
          if key.respond_to?(:operator)
            key.instance_variable_set :@name, name
            @context['with_scope'][key] = value
          else
            @context['with_scope'].delete(key)
            @context['with_scope'][name] = value
          end
        end
def modify_with_scope_key ( key , name , value ) if key . respond_to? ( :operator ) key . instance_variable_set :@name , name @context [ 'with_scope' ] [ key ] = value else @context [ 'with_scope' ] . delete ( key ) @context [ 'with_scope' ] [ name ] = value end end
Change the value of a key of the with_scope depending of its type.
Change the value of a key of the with_scope depending of its type .
key
<not_specific>
name
<not_specific>
value
<not_specific>
<not_specific>
value The new value associated to the key
value The new value associated to the key