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.



6
7
8
# File 'lib/zeta/local_or_remote_file.rb', line 6

def initialize(options)
  @options = options
end

Instance Method Details

#readObject



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

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