Class: OldMaid::LocalOrRemoteFile
- Inherits:
-
Object
- Object
- OldMaid::LocalOrRemoteFile
- Defined in:
- lib/old-maid/local_or_remote_file.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ LocalOrRemoteFile
constructor
A new instance of LocalOrRemoteFile.
- #read ⇒ Object
Constructor Details
#initialize(options) ⇒ LocalOrRemoteFile
Returns a new instance of LocalOrRemoteFile.
8 9 10 |
# File 'lib/old-maid/local_or_remote_file.rb', line 8 def initialize() @options = end |
Instance Method Details
#read ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/old-maid/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 |