Module: Base64Filter

Defined in:
lib/shopify-storefront.rb

Instance Method Summary collapse

Instance Method Details

#base64_encode(input) ⇒ Object



4
5
6
# File 'lib/shopify-storefront.rb', line 4

def base64_encode (input)
  Base64.encode64(input)
end

#storefront_product_id(input) ⇒ Object



7
8
9
10
# File 'lib/shopify-storefront.rb', line 7

def storefront_product_id (input)
  str = Base64.encode64("gid://shopify/Product/#{input}")
  return str.strip
end