class Hammer::Internal::HBytes

Public Instance Methods

len() click to toggle source

TODO: Probably should rename this to match ruby conventions: length, count, size

# File lib/hammer/internal.rb, line 177
def len
  self[:len]
end
token() click to toggle source
# File lib/hammer/internal.rb, line 168
def token
  # TODO: Encoding?
  # Should be the same encoding as the string the token was created with.
  # But how do we get to this knowledge at this point?
  # Cheap solution: Just ask the user (additional parameter with default value of UTF-8).
  self[:token].read_string(self[:len])
end