Sha256: 8e4883f1e91881eae63d102ec8c19d012e9244828ce3825de1fb22ea1cff4b9d
Contents?: true
Size: 719 Bytes
Versions: 29
Compression:
Stored size: 719 Bytes
Contents
# Author:: Eric Crane (mailto:eric.crane@mac.com) # Copyright:: Copyright (c) 2019 Eric Crane. All rights reserved. # # An Expression that can be evaluated. # module GlooLang module Expr class LBoolean < GlooLang::Core::Literal # # Is the given token a boolean? # def self.boolean?( token ) return GlooLang::Objs::Boolean.boolean? token end # # Set the value, converting to an boolean. # def set_value( value ) @value = GlooLang::Objs::Boolean.coerse_to_bool value end # # Get string representation # def to_s return 'false' unless @value return @value.to_s end end end end
Version data entries
29 entries across 29 versions & 1 rubygems