Class: Services::Builders::Image
- Inherits:
-
Object
- Object
- Services::Builders::Image
- Defined in:
- lib/services/builders/image.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(image_path) ⇒ Image
constructor
A new instance of Image.
Constructor Details
#initialize(image_path) ⇒ Image
6 7 8 |
# File 'lib/services/builders/image.rb', line 6 def initialize(image_path) @image_path = image_path end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/services/builders/image.rb', line 10 def call Google::Apis::VisionV1::Image.new(content: open(@image_path).to_a.join) end |