Class: Cnab::Detalhe::SegmentoTU
- Inherits:
-
Object
- Object
- Cnab::Detalhe::SegmentoTU
- Defined in:
- lib/cnab/detalhe/segmento_t_u.rb
Instance Method Summary collapse
-
#initialize(segmento_t, segmento_u) ⇒ SegmentoTU
constructor
A new instance of SegmentoTU.
- #method_missing(method_name) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(segmento_t, segmento_u) ⇒ SegmentoTU
Returns a new instance of SegmentoTU.
4 5 6 7 |
# File 'lib/cnab/detalhe/segmento_t_u.rb', line 4 def initialize(segmento_t, segmento_u) @segmento_t = segmento_t @segmento_u = segmento_u end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
9 10 11 12 13 |
# File 'lib/cnab/detalhe/segmento_t_u.rb', line 9 def method_missing(method_name) return @segmento_t.send(method_name) if @segmento_t.respond_to?(method_name) return @segmento_u.send(method_name) if @segmento_u.respond_to?(method_name) super end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/cnab/detalhe/segmento_t_u.rb', line 15 def respond_to_missing?(method_name, include_private = false) return true if @segmento_t.respond_to?(method_name) return true if @segmento_u.respond_to?(method_name) super end |