Class: Kamome::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/kamome/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
# File 'lib/kamome/configuration.rb', line 22

def initialize
  @tmp_path = ::File.join(Dir.tmpdir, 'kamome')
  @open_uri_options = {}
  @cleanup = true
end

Instance Attribute Details

#cleanupBolean

If you do not want to delete the downloaded csv, please specify ‘false`

Returns:

  • (Bolean)


20
21
22
# File 'lib/kamome/configuration.rb', line 20

def cleanup
  @cleanup
end

#open_uri_optionsHash

OpenURI options



15
16
17
# File 'lib/kamome/configuration.rb', line 15

def open_uri_options
  @open_uri_options
end

#tmp_pathString

Returns:

  • (String)


9
10
11
# File 'lib/kamome/configuration.rb', line 9

def tmp_path
  @tmp_path
end

Instance Method Details

#working_directoryPathname

Returns:

  • (Pathname)


29
30
31
# File 'lib/kamome/configuration.rb', line 29

def working_directory
  @working_directory ||= ::Pathname.new(@tmp_path.to_s)
end