Class: Compostr::ImageUpload
- Inherits:
-
Object
- Object
- Compostr::ImageUpload
- Defined in:
- lib/compostr/image_upload.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#post_id ⇒ Object
Returns the value of attribute post_id.
Instance Method Summary collapse
-
#do_upload! ⇒ Object
Push data to Wordpress instance, return attachment_id.
-
#initialize(file_path, post_id = nil) ⇒ ImageUpload
constructor
A new instance of ImageUpload.
Constructor Details
#initialize(file_path, post_id = nil) ⇒ ImageUpload
Returns a new instance of ImageUpload.
7 8 9 10 11 |
# File 'lib/compostr/image_upload.rb', line 7 def initialize file_path, post_id=nil # TODO decide on getMediaLibrary to find an already uploaded image @file_path = file_path @post_id = post_id end |
Instance Attribute Details
#file_path ⇒ Object
Returns the value of attribute file_path.
5 6 7 |
# File 'lib/compostr/image_upload.rb', line 5 def file_path @file_path end |
#post_id ⇒ Object
Returns the value of attribute post_id.
5 6 7 |
# File 'lib/compostr/image_upload.rb', line 5 def post_id @post_id end |