stop including padding
use it as a helper module
This commit is contained in:
@ -160,7 +160,7 @@ module Parfait
|
||||
# but additionally, the amount of data comes on top.
|
||||
# unfortuntely we can't just use super because of the Padding
|
||||
def padded_length
|
||||
padded_words( get_type().instance_length + get_length() )
|
||||
Padding.padded_words( get_type().instance_length + get_length() )
|
||||
end
|
||||
|
||||
def each
|
||||
|
@ -30,7 +30,6 @@ module Parfait
|
||||
object
|
||||
end
|
||||
|
||||
include Padding
|
||||
include Positioned
|
||||
|
||||
# 1 -based index
|
||||
@ -109,7 +108,7 @@ module Parfait
|
||||
end
|
||||
|
||||
def padded_length
|
||||
padded_words( @type.instance_length )
|
||||
Padding.padded_words( @type.instance_length )
|
||||
end
|
||||
|
||||
# parfait versions are deliberately called different, so we "relay"
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
class Symbol
|
||||
include Positioned
|
||||
include Padding
|
||||
|
||||
def has_type?
|
||||
true
|
||||
@ -12,7 +11,7 @@ class Symbol
|
||||
l
|
||||
end
|
||||
def padded_length
|
||||
padded to_s.length + 4
|
||||
Padding.padded( to_s.length + 4)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -196,7 +196,7 @@ module Parfait
|
||||
end
|
||||
|
||||
def padded_length
|
||||
padded( 4 * get_type().instance_length + @char_length )
|
||||
Padding.padded( 4 * get_type().instance_length + @char_length )
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user