You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
566 B
31 lines
566 B
module Cask::DSL
|
|
def self.included(base)
|
|
base.extend(ClassMethods)
|
|
end
|
|
|
|
def content_length; self.class.content_length; end
|
|
|
|
def homepage; self.class.homepage; end
|
|
|
|
def url; self.class.url; end
|
|
|
|
def version; self.class.version; end
|
|
|
|
module ClassMethods
|
|
def content_length(content_length=nil)
|
|
@content_length ||= content_length
|
|
end
|
|
|
|
def homepage(homepage=nil)
|
|
@homepage ||= homepage
|
|
end
|
|
|
|
def url(url=nil)
|
|
@url ||= URI.parse(url)
|
|
end
|
|
|
|
def version(version=nil)
|
|
@version ||= version
|
|
end
|
|
end
|
|
end
|
|
|