Class: Figs::Figsfile

Inherits:
Object
  • Object
show all
Defined in:
lib/figs/figsfile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Figsfile

Returns a new instance of Figsfile.



4
5
6
7
8
# File 'lib/figs/figsfile.rb', line 4

def initialize(*args)
  @repo = args.shift if args.first.downcase.end_with?(".git")
  @locations = args
  @method = @repo.nil? ? "path" : "git"
end

Instance Attribute Details

#locationsObject (readonly)

Returns the value of attribute locations.



3
4
5
# File 'lib/figs/figsfile.rb', line 3

def locations
  @locations
end

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/figs/figsfile.rb', line 3

def method
  @method
end

#repoObject (readonly)

Returns the value of attribute repo.



3
4
5
# File 'lib/figs/figsfile.rb', line 3

def repo
  @repo
end

Instance Method Details

#[](key) ⇒ Object



10
11
12
# File 'lib/figs/figsfile.rb', line 10

def [](key)
  send key
end