class Bashly::Models::Script
Attributes
command[R]
function_name[R]
Public Class Methods
new(command, function_name = nil)
click to toggle source
# File lib/bashly/models/script.rb, line 8 def initialize(command, function_name = nil) @command, @function_name = command, function_name end
Public Instance Methods
code()
click to toggle source
# File lib/bashly/models/script.rb, line 12 def code if function_name result = [header, render('wrapper')].join "\n" else result = [header, body].join "\n" end result.lint end
Private Instance Methods
body()
click to toggle source
# File lib/bashly/models/script.rb, line 28 def body @body ||= command.render('master_script') end
header()
click to toggle source
# File lib/bashly/models/script.rb, line 24 def header @header ||= render('header') end