Sha256: 51b28a284efd1ce446d661aa707e6b5007f119c816c095954797a5d78a5bcfe2

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 Bytes

Contents

class BaseBuilder
  def initialize document, username, password
    @document = document
    @username = username
    @password = password
  end

  def build
    raise "This method must be implemented"
  end

  protected

  def build_string
    @parameters.values.map { |p| p[:type] == "T" ? p[:value].to_s.ljust(p[:size], " ") : p[:value].to_s.rjust(p[:size],"0") }.join
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
biro-0.5.1 lib/biro/gateways/bvs/builders/base_builder.rb
biro-0.4.1 lib/biro/gateways/bvs/builders/base_builder.rb
biro-0.4.0 lib/biro/gateways/bvs/builders/base_builder.rb
biro-0.3.0 lib/biro/gateways/bvs/builders/base_builder.rb
biro-0.2.0 lib/biro/gateways/bvs/builders/base_builder.rb