Class: Roseflow::StabilityAI::OperationHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/roseflow/stabilityai/operation_handler.rb

Constant Summary collapse

OPERATION_CLASSES =
{
  text_to_image: Operations::TextToImage,
  image_to_image: Operations::ImageToImage,
  upscale: Operations::Upscale,
  masking: Operations::Masking,
}

Instance Method Summary collapse

Constructor Details

#initialize(operation, options = {}) ⇒ OperationHandler

Returns a new instance of OperationHandler.



18
19
20
21
# File 'lib/roseflow/stabilityai/operation_handler.rb', line 18

def initialize(operation, options = {})
  @operation = operation
  @options = options
end

Instance Method Details

#callObject



23
24
25
# File 'lib/roseflow/stabilityai/operation_handler.rb', line 23

def call
  operation_class.new(@options)
end