Class: Rubtools::Recipe

Inherits:
Object
  • Object
show all
Defined in:
lib/rubtools/recipe.rb

Direct Known Subclasses

Tools::Android

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#options=(value) ⇒ Object (writeonly)

Sets the attribute options

Parameters:

  • value

    the value to set the attribute options to.



3
4
5
# File 'lib/rubtools/recipe.rb', line 3

def options=(value)
  @options = value
end

Instance Method Details

#exec(args) ⇒ Object

Exec with output



14
15
16
17
18
19
20
# File 'lib/rubtools/recipe.rb', line 14

def exec(args)
  Logger.success "$ " + args if @options[:verbose]
  output = `#{args}`
  Logger.info "> " + output

  return output
end

#exec_without_output(args) ⇒ Object

Exec without output



7
8
9
10
# File 'lib/rubtools/recipe.rb', line 7

def exec_without_output(args)
  Logger.success "$ " + args if @options[:verbose]
  return `#{args}`
end