Class: Mode::Connector::Uploader
- Inherits:
-
Object
- Object
- Mode::Connector::Uploader
- Defined in:
- lib/mode/connector/uploader.rb
Instance Attribute Summary collapse
-
#dataset ⇒ Object
readonly
Returns the value of attribute dataset.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, dataset) ⇒ Uploader
constructor
A new instance of Uploader.
- #perform! ⇒ Object
Constructor Details
#initialize(path, dataset) ⇒ Uploader
7 8 9 10 |
# File 'lib/mode/connector/uploader.rb', line 7 def initialize(path, dataset) @path = path @dataset = dataset end |
Instance Attribute Details
#dataset ⇒ Object (readonly)
Returns the value of attribute dataset.
5 6 7 |
# File 'lib/mode/connector/uploader.rb', line 5 def dataset @dataset end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/mode/connector/uploader.rb', line 4 def path @path end |
Class Method Details
.error!(path, message, detail = nil) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mode/connector/uploader.rb', line 25 def error!(path, , detail = nil) Mode::API::Request.put(path, :execution => { :error => { :detail => detail, :message => } } ) end |
Instance Method Details
#perform! ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mode/connector/uploader.rb', line 12 def perform! Mode::API::Request.put( path, :execution => { :dataset => { :content => content, :columns => JSON.generate(columns) } } ) end |