Module: LogCabin::Modules::HomebrewCask

Defined in:
lib/prospectus/modules/homebrew_cask.rb

Overview

Pull state from a homebrew cask file

Instance Method Summary collapse

Instance Method Details

#load!Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/prospectus/modules/homebrew_cask.rb', line 6

def load!
  fail('No name specified') unless @name
  cask_file = "Casks/#{@name}.rb"
  version_regex = /^\s+version ['"](.+)['"]$/
  Prospectus::State.from_block(@option, @state) do
    grep
    file cask_file
    regex version_regex
  end
end