class String
Public Instance Methods
constantize()
click to toggle source
# File lib/substrate_common.rb, line 36 def constantize Object.const_get(self) end
hex_to_bytes()
click to toggle source
# File lib/substrate_common.rb, line 40 def hex_to_bytes data = self.start_with?('0x') ? self[2..] : self raise "Not valid hex string" if data.length % 2 != 0 data.scan(/../).map(&:hex) end