Class: Figs::Figsfile
- Inherits:
-
Object
- Object
- Figs::Figsfile
- Defined in:
- lib/figs/figsfile.rb
Instance Attribute Summary collapse
-
#locations ⇒ Object
readonly
Returns the value of attribute locations.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(*args) ⇒ Figsfile
constructor
A new instance of Figsfile.
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
#locations ⇒ Object (readonly)
Returns the value of attribute locations.
3 4 5 |
# File 'lib/figs/figsfile.rb', line 3 def locations @locations end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
3 4 5 |
# File 'lib/figs/figsfile.rb', line 3 def method @method end |
#repo ⇒ Object (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 |