Class: BaseStage

Inherits:
Object
  • Object
show all
Defined in:
lib/asker/ai/stages/base_stage.rb

Overview

Base Stage class

Direct Known Subclasses

StageB, StageD, StageF, StageI, StageS, StageT

Instance Method Summary collapse

Constructor Details

#initialize(concept_ai) ⇒ BaseStage

Initialize Stage with ConceptAI

Parameters:



8
9
10
# File 'lib/asker/ai/stages/base_stage.rb', line 8

def initialize(concept_ai)
  @concept_ai = concept_ai
end

Instance Method Details

#conceptObject



16
17
18
# File 'lib/asker/ai/stages/base_stage.rb', line 16

def concept
  @concept_ai.concept
end

#imagesObject



44
45
46
# File 'lib/asker/ai/stages/base_stage.rb', line 44

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

#langObject



32
33
34
# File 'lib/asker/ai/stages/base_stage.rb', line 32

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

#name(option = :raw) ⇒ Object



20
21
22
# File 'lib/asker/ai/stages/base_stage.rb', line 20

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

#namesObject



24
25
26
# File 'lib/asker/ai/stages/base_stage.rb', line 24

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

#neighborsObject



48
49
50
# File 'lib/asker/ai/stages/base_stage.rb', line 48

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

#numObject



28
29
30
# File 'lib/asker/ai/stages/base_stage.rb', line 28

def num
  @concept_ai.num
end

#random_image_for(option) ⇒ Object



52
53
54
# File 'lib/asker/ai/stages/base_stage.rb', line 52

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

#runObject



12
13
14
# File 'lib/asker/ai/stages/base_stage.rb', line 12

def run
  raise "Implement run method!"
end

#textsObject



40
41
42
# File 'lib/asker/ai/stages/base_stage.rb', line 40

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

#typeObject



36
37
38
# File 'lib/asker/ai/stages/base_stage.rb', line 36

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