Class: Einvoice::Client
- Inherits:
-
Object
- Object
- Einvoice::Client
- Defined in:
- lib/einvoice/client.rb
Instance Attribute Summary collapse
-
#provider ⇒ Object
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(provider) ⇒ Client
constructor
A new instance of Client.
- #method_missing(m, *args, &block) ⇒ Object
- #respond_to_missing?(m, include_private = false) ⇒ Boolean
Constructor Details
#initialize(provider) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/einvoice/client.rb', line 5 def initialize(provider) @provider = provider end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/einvoice/client.rb', line 9 def method_missing(m, *args, &block) if provider.respond_to?(m) provider.public_send(m, *args, &block) else super end end |
Instance Attribute Details
#provider ⇒ Object
Returns the value of attribute provider.
3 4 5 |
# File 'lib/einvoice/client.rb', line 3 def provider @provider end |
Instance Method Details
#respond_to_missing?(m, include_private = false) ⇒ Boolean
17 18 19 |
# File 'lib/einvoice/client.rb', line 17 def respond_to_missing?(m, include_private = false) provider.respond_to?(m) || super end |