Class: Luogu::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/luogu/agent.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.desc(content) ⇒ Object



9
10
11
# File 'lib/luogu/agent.rb', line 9

def desc(content)
  @_desc_ = content.gsub(/\n/, "")
end

.descriptionObject



21
22
23
# File 'lib/luogu/agent.rb', line 21

def description
  @_desc_
end

.input_desc(content) ⇒ Object



13
14
15
# File 'lib/luogu/agent.rb', line 13

def input_desc(content)
  @_input_desc_ = content
end

.input_descriptionObject



25
26
27
# File 'lib/luogu/agent.rb', line 25

def input_description
  @_input_desc_
end

.nameObject



17
18
19
# File 'lib/luogu/agent.rb', line 17

def name
  self.to_s
end

Instance Method Details

#call(input) ⇒ Object

Raises:

  • (NotImplementedError)


4
5
6
# File 'lib/luogu/agent.rb', line 4

def call(input)
  raise NotImplementedError, "call method must be implemented in subclass"
end