Sha256: bdfce4d1602a61d43c9647d9aeaa4aa6b0ea5c86a7ec907a97e3cd7374c2910d

Contents?: true

Size: 507 Bytes

Versions: 6

Compression:

Stored size: 507 Bytes

Contents

module LogCabin
  module Modules
    ##
    # Pull state from a homebrew formula file
    module HomebrewFormula
      def load!
        fail('No name specified') unless @name
        cask_file = "Formula/#{@name}.rb"
        version_regex = /^\s+version ['"](.+)['"]$/
        Prospectus::State.from_block(@option, @state) do
          grep
          file cask_file
          regex version_regex
        end
      end

      private

      def name(value)
        @name = value
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
prospectus-0.0.12 lib/prospectus/modules/homebrew_formula.rb
prospectus-0.0.11 lib/prospectus/modules/homebrew_formula.rb
prospectus-0.0.10 lib/prospectus/modules/homebrew_formula.rb
prospectus-0.0.9 lib/prospectus/modules/homebrew_formula.rb
prospectus-0.0.8 lib/prospectus/modules/homebrew_formula.rb
prospectus-0.0.6 lib/prospectus/modules/homebrew_formula.rb