Sha256: bf2ac133acb9fb2e55b54384e5c5caad009920becf93d828cc2d8df8a1f8e4a1
Contents?: true
Size: 296 Bytes
Versions: 3
Compression:
Stored size: 296 Bytes
Contents
module Basic101 class PowerOperation include Identity def initialize(left, right) @left = left @right = right end def eval(runtime) @left.eval(runtime) ** @right.eval(runtime) end protected def state [@left, @right] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
basic101-0.4.0 | lib/basic101/power_operation.rb |
basic101-0.2.0 | lib/basic101/power_operation.rb |
basic101-0.1.0 | lib/basic101/power_operation.rb |