Sha256: 998bde967ce8f3ec328e249f8ccdaa242731638b0e6fab9c208bf101adb773fb
Contents?: true
Size: 497 Bytes
Versions: 9
Compression:
Stored size: 497 Bytes
Contents
module BrDanfe class Options < OpenStruct DEFAULTOPTIONS = { logo_path: "" } 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
Version data entries
9 entries across 9 versions & 1 rubygems