Class: Hbc::Artifact::StageOnly

Inherits:
AbstractArtifact show all
Defined in:
Library/Homebrew/cask/lib/hbc/artifact/stage_only.rb

Instance Attribute Summary

Attributes inherited from AbstractArtifact

#cask, #config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractArtifact

#<=>, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #to_s

Methods included from Predicable

#attr_predicate

Constructor Details

#initialize(cask) ⇒ StageOnly

Returns a new instance of StageOnly



14
15
16
# File 'Library/Homebrew/cask/lib/hbc/artifact/stage_only.rb', line 14

def initialize(cask)
  super(cask)
end

Class Method Details

.from_args(cask, *args) ⇒ Object



6
7
8
9
10
11
12
# File 'Library/Homebrew/cask/lib/hbc/artifact/stage_only.rb', line 6

def self.from_args(cask, *args)
  if args != [true]
    raise CaskInvalidError.new(cask.token, "'stage_only' takes only a single argument: true")
  end

  new(cask)
end

Instance Method Details

#to_aObject



18
19
20
# File 'Library/Homebrew/cask/lib/hbc/artifact/stage_only.rb', line 18

def to_a
  [true]
end