Class Tap::Declarations::Context
In: lib/tap/declarations/context.rb
Parent: Object

Methods

method_missing   new   node   sh  

Included Modules

Declarations Tap::Utils

Attributes

app  [R] 

Public Class methods

[Source]

    # File lib/tap/declarations/context.rb, line 9
 9:       def initialize(app, ns=nil)
10:         @app = app
11:         initialize_declare
12:         namespace(ns)
13:       end

Public Instance methods

[Source]

    # File lib/tap/declarations/context.rb, line 26
26:       def method_missing(sym, *args, &block)
27:         app.send(sym, *args, &block)
28:       end

[Source]

    # File lib/tap/declarations/context.rb, line 22
22:       def node(num)
23:         app.get(num.to_s)
24:       end

Runs the command with system and raises an error if the command fails.

[Source]

    # File lib/tap/declarations/context.rb, line 17
17:       def sh(*cmd)
18:         app.log :sh, cmd.join(' ')
19:         system(*cmd) or raise "Command failed with status (#{$?.exitstatus}): [#{cmd.join(' ')}]"
20:       end

[Validate]