stop including padding

use it as a helper module
This commit is contained in:
Torsten Ruger
2016-12-31 20:08:33 +02:00
parent dccd097fef
commit 86dafccb04
7 changed files with 11 additions and 21 deletions

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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