Class: PDFService::Config
- Inherits:
-
Object
- Object
- PDFService::Config
- Defined in:
- lib/pdf_service/config.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#tmp_path ⇒ Object
readonly
Returns the value of attribute tmp_path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(logger: Logger.new(STDOUT), tmp_path: '.') ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(logger: Logger.new(STDOUT), tmp_path: '.') ⇒ Config
Returns a new instance of Config.
3 4 5 6 |
# File 'lib/pdf_service/config.rb', line 3 def initialize(logger: Logger.new(STDOUT), tmp_path: '.') @logger = logger @tmp_path = tmp_path end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
7 8 9 |
# File 'lib/pdf_service/config.rb', line 7 def logger @logger end |
#tmp_path ⇒ Object (readonly)
Returns the value of attribute tmp_path.
8 9 10 |
# File 'lib/pdf_service/config.rb', line 8 def tmp_path @tmp_path end |
Class Method Details
.[](value) ⇒ Object
11 12 13 14 |
# File 'lib/pdf_service/config.rb', line 11 def [](value) return value if value.kind_of?(self) new(value.to_h) end |