Class: RemoteTable::Request
- Inherits:
-
Object
- Object
- RemoteTable::Request
- Defined in:
- lib/remote_table/request.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#post_data ⇒ Object
Returns the value of attribute post_data.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(bus) ⇒ Request
constructor
TODO: support post_data TODO: support HTTP basic auth.
Constructor Details
#initialize(bus) ⇒ Request
TODO: support post_data TODO: support HTTP basic auth
7 8 9 |
# File 'lib/remote_table/request.rb', line 7 def initialize(bus) @url = bus[:url] or raise "need url" end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/remote_table/request.rb', line 3 def password @password end |
#post_data ⇒ Object
Returns the value of attribute post_data.
3 4 5 |
# File 'lib/remote_table/request.rb', line 3 def post_data @post_data end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/remote_table/request.rb', line 3 def url @url end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/remote_table/request.rb', line 3 def username @username end |
Instance Method Details
#download ⇒ Object
11 12 13 14 15 |
# File 'lib/remote_table/request.rb', line 11 def download path = ::File.join(staging_dir_path, 'REMOTE_TABLE_PACKAGE') `curl --silent \"#{url_with_google_docs_handling}\" > #{path}` path end |