class CamTool::ValidatorUtils
Public Class Methods
new()
click to toggle source
# File lib/camtool/validator_utils.rb, line 3 def initialize end
Public Instance Methods
is_activity?(id)
click to toggle source
# File lib/camtool/validator_utils.rb, line 13 def is_activity? id id = id.gsub 'cf:', '' bytes = Base64.decode64(id).bytes.to_a type = bytes[7] & 0xF0 return type == 0x40 end
is_agent?(id)
click to toggle source
# File lib/camtool/validator_utils.rb, line 27 def is_agent? id id = id.gsub 'cf:', '' bytes = Base64.decode64(id).bytes.to_a type = bytes[7] & 0xF0 return type == 0x10 end
is_entity?(id)
click to toggle source
# File lib/camtool/validator_utils.rb, line 20 def is_entity? id id = id.gsub 'cf:', '' bytes = Base64.decode64(id).bytes.to_a type = bytes[7] & 0xF0 return type == 0x20 end
is_relation?(id)
click to toggle source
# File lib/camtool/validator_utils.rb, line 6 def is_relation? id id = id.gsub 'cf:', '' bytes = Base64.decode64(id).bytes.to_a type = bytes[7] & 0xF0 return type == 0x80 end