Class: PDFService::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf_service/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#loggerObject (readonly)

Returns the value of attribute logger.



7
8
9
# File 'lib/pdf_service/config.rb', line 7

def logger
  @logger
end

#tmp_pathObject (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