Class: DockerfileRB::Add

Inherits:
Object
  • Object
show all
Defined in:
lib/dockerfile-rb/add.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arg, src, dest) ⇒ Add

Returns a new instance of Add.



4
5
6
7
8
9
10
11
12
# File 'lib/dockerfile-rb/add.rb', line 4

def initialize(arg, src, dest)
  string_arg = arg.to_s
  @arg = string_arg.to_s.split('=')[0] unless string_arg.nil?
  split_args = string_arg.split(':')
  @user = split_args[0].gsub(/--.+=/,'') unless split_args[0].nil?
  @group = split_args[1] unless split_args.nil?
  @src = src
  @dest = dest
end

Instance Attribute Details

#argObject (readonly)

Returns the value of attribute arg.



3
4
5
# File 'lib/dockerfile-rb/add.rb', line 3

def arg
  @arg
end

#destObject (readonly)

Returns the value of attribute dest.



3
4
5
# File 'lib/dockerfile-rb/add.rb', line 3

def dest
  @dest
end

#groupObject (readonly)

Returns the value of attribute group.



3
4
5
# File 'lib/dockerfile-rb/add.rb', line 3

def group
  @group
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/dockerfile-rb/add.rb', line 3

def name
  @name
end

#srcObject (readonly)

Returns the value of attribute src.



3
4
5
# File 'lib/dockerfile-rb/add.rb', line 3

def src
  @src
end

#userObject (readonly)

Returns the value of attribute user.



3
4
5
# File 'lib/dockerfile-rb/add.rb', line 3

def user
  @user
end