Class: ISO8583::BMP

Inherits:
Object
  • Object
show all
Defined in:
lib/message.rb

Overview

Internal class used to tie together name, bitmap number, field en/decoder and the value of the corresponding field

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bmp, name, field) ⇒ BMP

Returns a new instance of BMP.



406
407
408
409
410
# File 'lib/message.rb', line 406

def initialize(bmp, name, field)
  @bmp   = bmp
  @name  = name
  @field = field
end

Instance Attribute Details

#bmpObject

Returns the value of attribute bmp.



401
402
403
# File 'lib/message.rb', line 401

def bmp
  @bmp
end

#fieldObject

Returns the value of attribute field.



403
404
405
# File 'lib/message.rb', line 403

def field
  @field
end

#nameObject

Returns the value of attribute name.



402
403
404
# File 'lib/message.rb', line 402

def name
  @name
end

#valueObject

Returns the value of attribute value.



404
405
406
# File 'lib/message.rb', line 404

def value
  @value
end

Instance Method Details

#encodeObject



412
413
414
# File 'lib/message.rb', line 412

def encode
  field.encode(value)
end