Sha256: 02fdf5bb8a2b9e916e7319ac9024e6b9085b756624ba3d5c714eadb31d60df84
Contents?: true
Size: 541 Bytes
Versions: 21
Compression:
Stored size: 541 Bytes
Contents
class Code class Node class Decimal < Node def initialize(parsed) @decimal = parsed.delete(:decimal) if parsed.key?(:exponent) @exponent = Node::Statement.new(parsed.delete(:exponent)) end super(parsed) end def evaluate(**args) if @exponent ::Code::Object::Decimal.new( @decimal, exponent: @exponent.evaluate(**args) ) else ::Code::Object::Decimal.new(@decimal) end end end end end
Version data entries
21 entries across 21 versions & 3 rubygems