Method: Billomat::Models::Base#method_missing

Defined in:
lib/billomat/models/base.rb

#method_missing(method, *args, &block) ⇒ Object

All values in the @data hash can be accessed like a ‘normal’ method

Examples:

invoice = Billomat::Models::Invoice.new(invoice_number: '123')
invoice.invoice_number
#=> '123'


112
113
114
115
# File 'lib/billomat/models/base.rb', line 112

def method_missing(method, *args, &block)
  return @data[method] if @data.to_h.keys.include?(method)
  super
end