Class: ShopifyURL::Linker
- Inherits:
-
Object
- Object
- ShopifyURL::Linker
- Defined in:
- lib/shopify_url.rb
Instance Method Summary collapse
-
#initialize(shop) ⇒ Linker
constructor
A new instance of Linker.
- #to_s ⇒ Object (also: #to_str, #inspect)
Constructor Details
#initialize(shop) ⇒ Linker
Returns a new instance of Linker.
9 10 11 12 13 14 |
# File 'lib/shopify_url.rb', line 9 def initialize(shop) raise ArgumentError, "shop required" if empty?(shop) @host = shop.dup @host.prepend("https://") unless @host =~ %r{\Ahttps?://}i end |
Instance Method Details
#to_s ⇒ Object Also known as: to_str, inspect
16 17 18 |
# File 'lib/shopify_url.rb', line 16 def to_s @host.dup end |