Class: ISO8583::BMP

Inherits:
Object
  • Object
show all
Defined in:
lib/iso8583/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.



433
434
435
436
437
# File 'lib/iso8583/message.rb', line 433

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

Instance Attribute Details

#bmp ⇒ Object

Returns the value of attribute bmp.



428
429
430
# File 'lib/iso8583/message.rb', line 428

def bmp
  @bmp
end

#field ⇒ Object

Returns the value of attribute field.



430
431
432
# File 'lib/iso8583/message.rb', line 430

def field
  @field
end

#name ⇒ Object

Returns the value of attribute name.



429
430
431
# File 'lib/iso8583/message.rb', line 429

def name
  @name
end

#value ⇒ Object

Returns the value of attribute value.



431
432
433
# File 'lib/iso8583/message.rb', line 431

def value
  @value
end

Instance Method Details

#encode ⇒ Object



439
440
441
# File 'lib/iso8583/message.rb', line 439

def encode
  field.encode(value)
end