Sha256: 402ed58b923ad3bf914bbcadfdeb91a773adf26ef56e4bcdec959c7c63e5fc50
Contents?: true
Size: 661 Bytes
Versions: 1
Compression:
Stored size: 661 Bytes
Contents
module BrDanfe module DanfeLib class Options < OpenStruct DEFAULTOPTIONS = { logo: "", logo_dimensions: {}, products_quantity_precision: 2, products_unit_price_precision: 2 } def initialize(new_options={}) options = DEFAULTOPTIONS.merge(config_yaml_load) super options.merge(new_options) end private def file File.exists?("config/br_danfe.yml") ? File.open("config/br_danfe.yml").read : "" end def config_yaml_load @file_read = YAML.load( file ) @file_read ? (@file_read["br_danfe"]||{})["options"] : {} end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
br_danfe-0.5.2 | lib/br_danfe/danfe_lib/options.rb |