class LucidShopify::Webhook
Public Instance Methods
[](key)
click to toggle source
@param key [String]
@return [Object]
# File lib/lucid_shopify/webhook.rb, line 39 def [](key) data_hash[key] end
as_json(*)
click to toggle source
@return [Hash]
# File lib/lucid_shopify/webhook.rb, line 48 def as_json(*) to_h end
data_hash()
click to toggle source
@return [Hash]
# File lib/lucid_shopify/webhook.rb, line 21 def data_hash @data_hash ||= JSON.parse(data) rescue JSON::ParserError {} end
Also aliased as: to_h
each(&block)
click to toggle source
@see Hash#each
# File lib/lucid_shopify/webhook.rb, line 30 def each(&block) data_hash.each(&block) end
to_json(*args)
click to toggle source
@return [String]
# File lib/lucid_shopify/webhook.rb, line 55 def to_json(*args) as_json.to_json(*args) end