Class: Embulk::Input::GoogleSpreadsheets::LocalFile

Inherits:
Object
  • Object
show all
Defined in:
lib/embulk/input/google_spreadsheets.rb

Overview

support config by file path or content which supported by org.embulk.spi.unit.LocalFile json_keyfile:

content: |

Class Method Summary collapse

Class Method Details

.load(v) ⇒ Object

return JSON string



18
19
20
21
22
23
24
# File 'lib/embulk/input/google_spreadsheets.rb', line 18

def self.load(v)
  if v.is_a?(String)
    File.read(v)
  elsif v.is_a?(Hash)
    v['content']
  end
end