Class: Transit::ByteArray

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/transit/transit_types.rb

Overview

Represents a transit byte array extension type.

Instance Attribute Summary

Attributes inherited from Wrapper

#value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Wrapper

#==, #initialize, #inspect

Constructor Details

This class inherits a constructor from Transit::Wrapper

Class Method Details

.from_base64(data) ⇒ Object



62
63
64
# File 'lib/transit/transit_types.rb', line 62

def self.from_base64(data)
  new(Base64.decode64(data))
end

Instance Method Details

#to_base64Object



66
67
68
# File 'lib/transit/transit_types.rb', line 66

def to_base64
  Base64.encode64(@value)
end

#to_sObject



70
71
72
# File 'lib/transit/transit_types.rb', line 70

def to_s
  @value
end