Class: Layabout::FileUpload
- Inherits:
-
Object
- Object
- Layabout::FileUpload
- Extended by:
- Forwardable
- Defined in:
- lib/layabout/file_upload.rb
Instance Attribute Summary collapse
-
#channels ⇒ Object
readonly
Returns the value of attribute channels.
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ FileUpload
constructor
A new instance of FileUpload.
- #upload ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ FileUpload
Returns a new instance of FileUpload.
12 13 14 15 16 17 18 19 20 |
# File 'lib/layabout/file_upload.rb', line 12 def initialize(={}) @configuration = ::Layabout.configuration @filepath = .fetch(:filepath) @channels = .fetch(:channels) @filetype = [:filetype] @filename = [:filename] @title = [:title] @initial_comment = [:initial_comment] end |
Instance Attribute Details
#channels ⇒ Object (readonly)
Returns the value of attribute channels.
10 11 12 |
# File 'lib/layabout/file_upload.rb', line 10 def channels @channels end |
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
10 11 12 |
# File 'lib/layabout/file_upload.rb', line 10 def filepath @filepath end |
Instance Method Details
#upload ⇒ Object
22 23 24 |
# File 'lib/layabout/file_upload.rb', line 22 def upload SlackResponse.new(wrap(http_response)) end |