Class: ProconBypassMan::Domains::Binary::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/procon_bypass_man/procon/value_objects/binary/base.rb

Direct Known Subclasses

InboundProconBinary, ProcessingProconBinary

Instance Method Summary collapse

Constructor Details

#initialize(binary:) ⇒ Base

Returns a new instance of Base.

Parameters:

  • binary (String)


3
4
5
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 3

def initialize(binary: )
  @binary = binary
end

Instance Method Details

#binaryString

Returns:

  • (String)

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 8

def binary
  raise NotImplementedError
end

#rawString

Returns:

  • (String)


13
14
15
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 13

def raw
  binary
end

#to_procon_readerProconBypassMan::ProconReader



22
23
24
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 22

def to_procon_reader
  ProconBypassMan::ProconReader.new(binary: binary)
end

#unpackObject



17
18
19
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 17

def unpack
  binary.unpack("H*")
end