Class: Coco::ImageUploader
- Inherits:
-
Component
- Object
- Component
- Coco::ImageUploader
- Includes:
- Concerns::AcceptsOptions
- Defined in:
- app/components/coco/base/image_uploader/image_uploader.rb
Instance Attribute Summary collapse
-
#accept ⇒ Object
readonly
Returns the value of attribute accept.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #clickable? ⇒ Boolean
- #droppable? ⇒ Boolean
-
#initialize(accept: "image/*", **kwargs) ⇒ ImageUploader
constructor
A new instance of ImageUploader.
Methods included from Concerns::AcceptsOptions
#accepted_options, #get_option_group
Constructor Details
#initialize(accept: "image/*", **kwargs) ⇒ ImageUploader
Returns a new instance of ImageUploader.
10 11 12 |
# File 'app/components/coco/base/image_uploader/image_uploader.rb', line 10 def initialize(accept: "image/*", **kwargs) @accept = accept end |
Instance Attribute Details
#accept ⇒ Object (readonly)
Returns the value of attribute accept.
8 9 10 |
# File 'app/components/coco/base/image_uploader/image_uploader.rb', line 8 def accept @accept end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'app/components/coco/base/image_uploader/image_uploader.rb', line 8 def name @name end |
Instance Method Details
#clickable? ⇒ Boolean
14 15 16 |
# File 'app/components/coco/base/image_uploader/image_uploader.rb', line 14 def clickable? get_option_value(:click) end |
#droppable? ⇒ Boolean
18 19 20 |
# File 'app/components/coco/base/image_uploader/image_uploader.rb', line 18 def droppable? get_option_value(:drop) end |