Sha256: feaf115ad8761166690bd2695278e74e4d86143bcc3960ed04c28f4a3b803868

Contents?: true

Size: 863 Bytes

Versions: 28

Compression:

Stored size: 863 Bytes

Contents

# frozen_string_literal: true

# Base Stage class
class BaseStage
  #
  # Initialize Stage with ConceptAI
  # @param concept_ai (ConceptAI)
  def initialize(concept_ai)
    @concept_ai = concept_ai
  end

  def run
    raise 'Implement run method!'
  end

  def concept
    @concept_ai.concept
  end

  def name(option = :raw)
    @concept_ai.concept.name(option)
  end

  def names
    raise 'Change names by concept.names'
  end

  def num
    @concept_ai.num
  end

  def lang
    raise 'Change lang by concept.lang'
  end

  def type
    raise 'Change type by concept.type'
  end

  def texts
    raise 'Change texts by cocept.texts'
  end

  def images
    raise 'Change images by cocept.images'
  end

  def neighbors
    raise 'Change neighbors by concept.neighbors'
  end

  def random_image_for(option)
    @concept_ai.random_image_for(option)
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
asker-tool-2.3.1 lib/asker/ai/stages/base_stage.rb
asker-tool-2.3.0 lib/asker/ai/stages/base_stage.rb
asker-tool-2.2.5 lib/asker/ai/stages/base_stage.rb
asker-tool-2.2.4 lib/asker/ai/stages/base_stage.rb
asker-tool-2.2.3 lib/asker/ai/stages/base_stage.rb
asker-tool-2.2.2 lib/asker/ai/stages/base_stage.rb
asker-tool-2.2.1 lib/asker/ai/stages/base_stage.rb
asker-tool-2.2.0 lib/asker/ai/stages/base_stage.rb