class Tablescript::LookupStrategy
Public Class Methods
new(table, roll)
click to toggle source
# File lib/tablescript/lookup_strategy.rb, line 23 def initialize(table, roll) @table = table @roll = roll @value = nil end
Public Instance Methods
value()
click to toggle source
# File lib/tablescript/lookup_strategy.rb, line 29 def value evaluate @value end
Private Instance Methods
evaluate()
click to toggle source
# File lib/tablescript/lookup_strategy.rb, line 36 def evaluate return unless @value.nil? @value = @table.lookup(@roll) end