Class: BrewCaskTools::Casks::Info
- Inherits:
-
Object
- Object
- BrewCaskTools::Casks::Info
- Defined in:
- lib/bct/cask/info.rb
Overview
Class to keep brittle parsing of ‘brew cask info #cask` localized.
Instance Method Summary collapse
- #app_name ⇒ Object
- #cask_url ⇒ Object
-
#initialize(arr) ⇒ Info
constructor
A new instance of Info.
- #name ⇒ Object
- #path ⇒ Object
- #short_name ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(arr) ⇒ Info
Returns a new instance of Info.
5 6 7 |
# File 'lib/bct/cask/info.rb', line 5 def initialize(arr) @info = arr.nil? ? [] : arr end |
Instance Method Details
#app_name ⇒ Object
29 30 31 |
# File 'lib/bct/cask/info.rb', line 29 def app_name @info[7] end |
#cask_url ⇒ Object
21 22 23 |
# File 'lib/bct/cask/info.rb', line 21 def cask_url @info[3] end |
#name ⇒ Object
25 26 27 |
# File 'lib/bct/cask/info.rb', line 25 def name @info[5] end |
#path ⇒ Object
17 18 19 |
# File 'lib/bct/cask/info.rb', line 17 def path @info[2] end |
#short_name ⇒ Object
9 10 11 |
# File 'lib/bct/cask/info.rb', line 9 def short_name @info[0] end |
#url ⇒ Object
13 14 15 |
# File 'lib/bct/cask/info.rb', line 13 def url @info[1] end |