Class: ShopifyURL::Store::Blogs

Inherits:
String
  • Object
show all
Defined in:
lib/shopify_url.rb

Instance Method Summary collapse

Constructor Details

#initialize(host, category, qs = nil) ⇒ Blogs

Returns a new instance of Blogs.



66
67
68
69
70
# File 'lib/shopify_url.rb', line 66

def initialize(host, category, qs = nil)
  super host + "/blogs"
  self << "/" << category
  self << "?" << qs if qs
end

Instance Method Details

#entry(name, params = nil) ⇒ Object



72
73
74
75
76
# File 'lib/shopify_url.rb', line 72

def entry(name, params = nil)
  self << "/" << name
  self << "?" << URI.encode_www_form(params.to_a) if params && params.any?
  self
end