Class: BareTypes::I16
Class Method Summary
collapse
Instance Method Summary
collapse
#==, #finalize_references, #to_schema
Methods inherited from BaseType
#cycle_search, #initialize
Class Method Details
.make(depth, names) ⇒ Object
75
76
77
|
# File 'lib/generative_testing/monkey_patch.rb', line 75
def self.make(depth, names)
BareTypes::I16.new
end
|
Instance Method Details
79
80
81
|
# File 'lib/generative_testing/monkey_patch.rb', line 79
def create_input
rand(2 ** 16) - (2 ** 15)
end
|
#decode(msg) ⇒ Object
357
358
359
|
# File 'lib/types.rb', line 357
def decode(msg)
return msg.unpack('s<')[0], msg[2..msg.size]
end
|
#encode(msg, buffer) ⇒ Object
353
354
355
|
# File 'lib/types.rb', line 353
def encode(msg, buffer)
buffer << [msg].pack("s<")
end
|