Class: Wongi::Engine::TokenAssignment

Inherits:
Struct
  • Object
show all
Defined in:
lib/wongi-engine/token_assignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fieldObject

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



2
3
4
# File 'lib/wongi-engine/token_assignment.rb', line 2

def field
  @field
end

#wmeObject

Returns the value of attribute wme

Returns:

  • (Object)

    the current value of wme



2
3
4
# File 'lib/wongi-engine/token_assignment.rb', line 2

def wme
  @wme
end

Instance Method Details

#call(_token = nil) ⇒ Object



3
4
5
# File 'lib/wongi-engine/token_assignment.rb', line 3

def call(_token = nil)
  wme.send field
end

#inspectObject



7
8
9
# File 'lib/wongi-engine/token_assignment.rb', line 7

def inspect
  "#{field} of #{wme}"
end

#to_sObject



11
12
13
# File 'lib/wongi-engine/token_assignment.rb', line 11

def to_s
  inspect
end