Class: Zeta::LocalOrRemoteFile

Inherits:
Object
  • Object
show all
Defined in:
lib/zeta/local_or_remote_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ LocalOrRemoteFile

Returns a new instance of LocalOrRemoteFile.



8
9
10
# File 'lib/zeta/local_or_remote_file.rb', line 8

def initialize(options)
  @options = options
end

Instance Method Details

#readObject



12
13
14
15
16
17
18
19
20
# File 'lib/zeta/local_or_remote_file.rb', line 12

def read
  if @options[:path]
    read_local
  elsif @options[:github]
    read_from_github
  else
    raise "Unknown file location #{@options}"
  end
end