lib/amazon_product_advertising_api/operations/item.rb
# This simply looks at the defined parameters and creates a hash of the ones that have values assigned.
# Need to work out a way of doing this so I don't need to keep defining exactly the same method in each class.
This simply looks at the defined parameters and creates a hash of the ones that have values assigned.
Need to work out a way of doing this so I don't need to keep defining exactly the same method in each class.
This simply looks at the defined parameters and creates a hash of the ones that have values assigned . Need to work out a way of doing this so I don ' t need to keep defining exactly the same method in each class .
def params
            self.class.const_get("REQUEST_PARAMETERS").inject({}) do |parameters, parameter|
              parameters[parameter] = instance_variable_get("@#{parameter}") unless instance_variable_get("@#{parameter}").nil?
              parameters
            end
          end
def params self . class . const_get ( "REQUEST_PARAMETERS" ) . inject ( { } ) do | parameters , parameter | parameters [ parameter ] = instance_variable_get ( "@#{parameter}" ) unless instance_variable_get ( "@#{parameter}" ) . nil? parameters end end
This simply looks at the defined parameters and creates a hash of the ones that have values assigned.
This simply looks at the defined parameters and creates a hash of the ones that have values assigned .