mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
27 lines
523 B
Ruby
27 lines
523 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Cask
|
|
class DSL
|
|
# Class corresponding to the `appcast` stanza.
|
|
#
|
|
# @api private
|
|
class Appcast
|
|
attr_reader :uri, :parameters, :must_contain
|
|
|
|
def initialize(uri, **parameters)
|
|
@uri = URI(uri)
|
|
@parameters = parameters
|
|
@must_contain = parameters[:must_contain] if parameters.key?(:must_contain)
|
|
end
|
|
|
|
def to_yaml
|
|
[uri, parameters].to_yaml
|
|
end
|
|
|
|
def to_s
|
|
uri.to_s
|
|
end
|
|
end
|
|
end
|
|
end
|