Class: Urushiol::Txreq
- Inherits:
-
Object
- Object
- Urushiol::Txreq
- Defined in:
- lib/txreq.rb
Instance Method Summary collapse
- #get_source ⇒ Object
- #host(host) ⇒ Object
-
#initialize ⇒ Txreq
constructor
A new instance of Txreq.
- #protocol(proto) ⇒ Object
- #request(type) ⇒ Object
- #url(url) ⇒ Object
Constructor Details
#initialize ⇒ Txreq
Returns a new instance of Txreq.
4 5 6 |
# File 'lib/txreq.rb', line 4 def initialize @req = "\ntxreq" end |
Instance Method Details
#get_source ⇒ Object
24 25 26 |
# File 'lib/txreq.rb', line 24 def get_source @req end |
#host(host) ⇒ Object
16 17 18 |
# File 'lib/txreq.rb', line 16 def host(host) @req << " -hdr \"Host: #{host.strip}\"" end |
#protocol(proto) ⇒ Object
12 13 14 |
# File 'lib/txreq.rb', line 12 def protocol(proto) @req << " -proto #{proto.strip}" end |
#request(type) ⇒ Object
20 21 22 |
# File 'lib/txreq.rb', line 20 def request(type) @req << " -req #{type.strip.upcase}" end |
#url(url) ⇒ Object
8 9 10 |
# File 'lib/txreq.rb', line 8 def url(url) @req << " -url #{url.strip}" end |