class Lucid::Shopify::Webhook
Public Instance Methods
[](key)
click to toggle source
@param key [String]
@return [Object]
# File lib/lucid/shopify/webhook.rb, line 34 def [](key) data_hash[key] end
as_json(*)
click to toggle source
@return [Hash]
# File lib/lucid/shopify/webhook.rb, line 41 def as_json(*) to_h end
data_hash()
click to toggle source
@return [Hash]
# File lib/lucid/shopify/webhook.rb, line 20 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 27 def each(&block) data_hash.each(&block) end
to_json(*args)
click to toggle source
@return [String]
# File lib/lucid/shopify/webhook.rb, line 46 def to_json(*args) as_json.to_json(*args) end