Sha256: b3cdaa42767f517c776cfb55807060a1b104590c25495442a076856736d8aabf
Contents?: true
Size: 566 Bytes
Versions: 25
Compression:
Stored size: 566 Bytes
Contents
module BrDanfe module Logo class Config < OpenStruct DEFAULTOPTIONS = { logo: '', logo_dimensions: {} }.freeze def initialize(new_options = {}) options = DEFAULTOPTIONS.merge(config_yaml_load) super options.merge(new_options) end private def file File.exist?('config/br_danfe.yml') ? File.open('config/br_danfe.yml').read : '' end def config_yaml_load @file_read = YAML.safe_load(file) @file_read ? (@file_read['br_danfe'] || {})['options'] : {} end end end end
Version data entries
25 entries across 25 versions & 1 rubygems