Class: Buildkite::Env
Defined Under Namespace
Modules: Fallback
Constant Summary collapse
- BUILDKITE =
- 'BUILDKITE'
- PREFIX =
- "#{BUILDKITE}_"
Class Method Summary collapse
Instance Method Summary collapse
- #default_branch? ⇒ Boolean
- 
  
    
      #initialize(env)  ⇒ Env 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Env. 
- #pull_request ⇒ Object
Methods included from Fallback
#method_missing, #respond_to_missing?
Constructor Details
#initialize(env) ⇒ Env
Returns a new instance of Env.
| 31 32 33 | # File 'lib/buildkite/env.rb', line 31 def initialize(env) @env = env end | 
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Buildkite::Env::Fallback
Class Method Details
.load(env) ⇒ Object
| 27 28 29 | # File 'lib/buildkite/env.rb', line 27 def self.load(env) new(env) if env[BUILDKITE] end | 
Instance Method Details
#default_branch? ⇒ Boolean
| 35 36 37 | # File 'lib/buildkite/env.rb', line 35 def default_branch? pipeline_default_branch == branch end | 
#pull_request ⇒ Object
| 39 40 41 | # File 'lib/buildkite/env.rb', line 39 def pull_request super == 'false' ? false : Integer(super) end |