Class: Gollum::RemoteCode

Inherits:
Object
  • Object
show all
Defined in:
lib/gollum-lib/remote_code.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ RemoteCode

Returns a new instance of RemoteCode.

Raises:

  • (ArgumentError)


9
10
11
12
# File 'lib/gollum-lib/remote_code.rb', line 9

def initialize path
  raise(ArgumentError, 'path is nil or empty') if path.nil? or path.empty?
  @uri = URI(path)
end

Instance Method Details

#contentsObject



14
15
16
# File 'lib/gollum-lib/remote_code.rb', line 14

def contents
  @contents ||= req @uri
end