class SunatInvoice::Model
Public Class Methods
new(options = {})
click to toggle source
# File lib/sunat_invoice/model.rb, line 5 def initialize(options = {}) options.each do |key, value| send("#{key}=", value) if respond_to?("#{key}=") end end
Public Instance Methods
to_hash()
click to toggle source
# File lib/sunat_invoice/model.rb, line 11 def to_hash hash = {} instance_variables.map do |var| var_name = var.to_s.split('@')[1] hash[var_name] = instance_variable_get(var) end hash end