Class: FPM::Fry::Plugin::Service::Environment

Inherits:
Struct
  • Object
show all
Defined in:
lib/fpm/fry/plugin/service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#chdirObject

Returns the value of attribute chdir

Returns:

  • (Object)

    the current value of chdir



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def chdir
  @chdir
end

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def command
  @command
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def description
  @description
end

#groupObject

Returns the value of attribute group

Returns:

  • (Object)

    the current value of group



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def group
  @group
end

#limitsObject

Returns the value of attribute limits

Returns:

  • (Object)

    the current value of limits



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def limits
  @limits
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def name
  @name
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



9
10
11
# File 'lib/fpm/fry/plugin/service.rb', line 9

def user
  @user
end

Instance Method Details

#render(file) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/fpm/fry/plugin/service.rb', line 11

def render(file)
  _erbout = ""
  path = File.join(File.dirname(__FILE__),'..','templates',file)
  erb = ERB.new(IO.read(path), trim_mode: "-")
  eval erb.src, nil, path
  return _erbout
end