class Niman::Nimanfile
Attributes
instructions[R]
Public Class Methods
new()
click to toggle source
# File lib/niman/nimanfile.rb, line 8 def initialize @instructions = [] end
Public Instance Methods
exec(use_sudo = :no_sudo, command)
click to toggle source
# File lib/niman/nimanfile.rb, line 25 def exec(use_sudo = :no_sudo, command) @instructions.push(Niman::Library::Command.new(command: command, use_sudo: use_sudo)) end
file(path) { |f| ... }
click to toggle source
# File lib/niman/nimanfile.rb, line 12 def file(path) f = Niman::Library::File.new(path: path) yield(f) @instructions.push(f) end
package(path = nil) { |package| ... }
click to toggle source
# File lib/niman/nimanfile.rb, line 18 def package(path = nil) package = Niman::Library::Package.new package.path = path unless path.nil? yield(package) if block_given? @instructions.push(package) end