Class: Binda::Shopify::ProductType

Inherits:
Object
  • Object
show all
Defined in:
lib/binda/shopify/product_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, shop) ⇒ ProductType

Returns a new instance of ProductType.



7
8
9
# File 'lib/binda/shopify/product_type.rb', line 7

def initialize name, shop
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/binda/shopify/product_type.rb', line 6

def name
  @name
end

Instance Method Details

#idObject



15
16
17
# File 'lib/binda/shopify/product_type.rb', line 15

def id
  Digest::MD5.hexdigest self.title if self.title.present?
end

#titleObject



11
12
13
# File 'lib/binda/shopify/product_type.rb', line 11

def title
  name
end