Class: BrewCaskTools::Casks::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/bct/cask/info.rb

Overview

Class to keep brittle parsing of ‘brew cask info #cask` localized.

Instance Method Summary collapse

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_nameObject



29
30
31
# File 'lib/bct/cask/info.rb', line 29

def app_name
  @info[7]
end

#cask_urlObject



21
22
23
# File 'lib/bct/cask/info.rb', line 21

def cask_url
  @info[3]
end

#nameObject



25
26
27
# File 'lib/bct/cask/info.rb', line 25

def name
  @info[5]
end

#pathObject



17
18
19
# File 'lib/bct/cask/info.rb', line 17

def path
  @info[2]
end

#short_nameObject



9
10
11
# File 'lib/bct/cask/info.rb', line 9

def short_name
  @info[0]
end

#urlObject



13
14
15
# File 'lib/bct/cask/info.rb', line 13

def url
  @info[1]
end