Class: Rocknab::Builders::Padding

Inherits:
Struct
  • Object
show all
Defined in:
lib/rocknab/builder/padding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defaultObject

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



3
4
5
# File 'lib/rocknab/builder/padding.rb', line 3

def default
  @default
end

#lengthObject

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



3
4
5
# File 'lib/rocknab/builder/padding.rb', line 3

def length
  @length
end

Instance Method Details

#build(klass) ⇒ Object



4
5
6
# File 'lib/rocknab/builder/padding.rb', line 4

def build(klass)
  default.to_s * length
end