Class: DTK::Network::Client::ModuleRef::Version::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/client/module_ref/version/source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ Source

Returns a new instance of Source.



6
7
8
9
10
11
12
13
# File 'lib/client/module_ref/version/source.rb', line 6

def initialize(source)
  # right now we only support file as source, later we can introduce other sources
  if matching_source = source.match(/(file:)(.*)/)
    @location = matching_source[2]
  else
    fail "Unsuppored source format: #{source}!"
  end
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



5
6
7
# File 'lib/client/module_ref/version/source.rb', line 5

def location
  @location
end