Class: WarrantyCheck::BaseVendor
- Inherits:
-
Object
- Object
- WarrantyCheck::BaseVendor
show all
- Defined in:
- lib/vendors/base_vendor.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseVendor.
17
18
19
20
|
# File 'lib/vendors/base_vendor.rb', line 17
def initialize(sn)
@sn = sn
@warranties = []
end
|
Instance Attribute Details
#dom ⇒ Object
Returns the value of attribute dom.
14
15
16
|
# File 'lib/vendors/base_vendor.rb', line 14
def dom
@dom
end
|
#html ⇒ Object
Returns the value of attribute html.
13
14
15
|
# File 'lib/vendors/base_vendor.rb', line 13
def html
@html
end
|
#warranties ⇒ Object
Returns the value of attribute warranties.
15
16
17
|
# File 'lib/vendors/base_vendor.rb', line 15
def warranties
@warranties
end
|
Instance Method Details
#check ⇒ Object
22
23
24
|
# File 'lib/vendors/base_vendor.rb', line 22
def check
nil
end
|
#http_method ⇒ Object
34
35
36
|
# File 'lib/vendors/base_vendor.rb', line 34
def http_method
:get
end
|
#service_base_url ⇒ Object
26
27
28
|
# File 'lib/vendors/base_vendor.rb', line 26
def service_base_url
"http://www.example.com"
end
|
#service_uri ⇒ Object
30
31
32
|
# File 'lib/vendors/base_vendor.rb', line 30
def service_uri
"/%s"
end
|
#uri ⇒ Object
42
43
44
|
# File 'lib/vendors/base_vendor.rb', line 42
def uri
@uri ||= sprintf(service_uri, @sn)
end
|
#url ⇒ Object
38
39
40
|
# File 'lib/vendors/base_vendor.rb', line 38
def url
@url ||= URI.parse(service_base_url)
end
|