Class: ResourceStageContext Private
- Inherits:
-
Object
- Object
- ResourceStageContext
- Extended by:
- Forwardable
- Defined in:
- resource.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
The context in which a Resource#stage occurs. Supports access to both the Resource and associated Mktemp in a single block argument. The interface is back-compatible with Resource itself as used in that context.
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
private
The Resource that is being staged.
- #staging ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(resource, staging) ⇒ ResourceStageContext
constructor
private
A new instance of ResourceStageContext.
-
#to_s ⇒ String
private
Constructor Details
#initialize(resource, staging) ⇒ ResourceStageContext
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns a new instance of ResourceStageContext.
357 358 359 360 |
# File 'resource.rb', line 357 def initialize(resource, staging) @resource = resource @staging = staging end |
Instance Attribute Details
#resource ⇒ Object (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
The Resource that is being staged.
350 351 352 |
# File 'resource.rb', line 350 def resource @resource end |
#staging ⇒ Object (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
352 353 354 |
# File 'resource.rb', line 352 def staging @staging end |
Instance Method Details
#to_s ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
363 364 365 |
# File 'resource.rb', line 363 def to_s "<#{self.class}: resource=#{resource} staging=#{staging}>" end |