Class: Binda::Shopify::ProductType
- Inherits:
-
Object
- Object
- Binda::Shopify::ProductType
- Defined in:
- lib/binda/shopify/product_type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(name, shop) ⇒ ProductType
constructor
A new instance of ProductType.
- #title ⇒ Object
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
#name ⇒ Object
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
#id ⇒ Object
15 16 17 |
# File 'lib/binda/shopify/product_type.rb', line 15 def id Digest::MD5.hexdigest self.title if self.title.present? end |
#title ⇒ Object
11 12 13 |
# File 'lib/binda/shopify/product_type.rb', line 11 def title name end |