Class: ProconBypassMan::Domains::Binary::Base
- Inherits:
-
Object
- Object
- ProconBypassMan::Domains::Binary::Base
show all
- Defined in:
- lib/procon_bypass_man/procon/value_objects/binary/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(binary:) ⇒ Base
Returns a new instance of Base.
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
#binary ⇒ String
8
9
10
|
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 8
def binary
raise NotImplementedError
end
|
#raw ⇒ String
13
14
15
|
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 13
def raw
binary
end
|
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
|
#unpack ⇒ Object
17
18
19
|
# File 'lib/procon_bypass_man/procon/value_objects/binary/base.rb', line 17
def unpack
binary.unpack("H*")
end
|