Class: Shopify::DefaultVariant::Hash
- Inherits:
-
Object
- Object
- Shopify::DefaultVariant::Hash
- Defined in:
- lib/shopify/default_variant.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ Hash
constructor
A new instance of Hash.
- #match? ⇒ Boolean
Constructor Details
#initialize(hash) ⇒ Hash
Returns a new instance of Hash.
39 40 41 |
# File 'lib/shopify/default_variant.rb', line 39 def initialize(hash) @hash = hash end |
Instance Method Details
#match? ⇒ Boolean
43 44 45 46 47 |
# File 'lib/shopify/default_variant.rb', line 43 def match? return false unless @hash.is_a?(::Hash) plain_hash_match? || graphql_hash_match? end |