Class: Skeem::SkmChar

Inherits:
SkmSimpleDatum show all
Defined in:
lib/skeem/skm_simple_datum.rb

Overview

class

Instance Attribute Summary

Attributes inherited from SkmSimpleDatum

#token, #value

Attributes inherited from SkmElement

#position

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SkmSimpleDatum

#==, #accept, create, #done!, #evaluate, #init_value, #initialize, #position, #quasiquote, #symbol, #verbatim?

Methods inherited from SkmElement

#accept, #boolean?, #bound!, #callable?, #complex?, #done!, #eqv?, #evaluate, #initialize, #inspect, #integer?, #list?, #null?, #number?, #pair?, #procedure?, #quasiquote, #quoted!, #rational?, #real?, #skm_eq?, #skm_equal?, #string?, #symbol?, #unquoted!, #vector?, #verbatim?

Constructor Details

This class inherits a constructor from Skeem::SkmSimpleDatum

Class Method Details

.create_from_int(anInteger) ⇒ Object



161
162
163
164
165
# File 'lib/skeem/skm_simple_datum.rb', line 161

def self.create_from_int(anInteger)
  int_value = anInteger.kind_of?(SkmInteger) ? anInteger.value : anInteger
  char_value = int_value < 0xff ? int_value.chr : [int_value].pack('U')
  create(char_value)
end

Instance Method Details

#char?Boolean

Returns:

  • (Boolean)


157
158
159
# File 'lib/skeem/skm_simple_datum.rb', line 157

def char?
  true
end