Class: DockerfileRB::Copy
- Inherits:
-
Object
- Object
- DockerfileRB::Copy
- Defined in:
- lib/dockerfile-rb/copy.rb
Instance Attribute Summary collapse
-
#arg ⇒ Object
readonly
Returns the value of attribute arg.
-
#dest ⇒ Object
readonly
Returns the value of attribute dest.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#src ⇒ Object
readonly
Returns the value of attribute src.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(arg, src, dest) ⇒ Copy
constructor
A new instance of Copy.
Constructor Details
#initialize(arg, src, dest) ⇒ Copy
Returns a new instance of Copy.
4 5 6 7 8 9 10 11 12 |
# File 'lib/dockerfile-rb/copy.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
#arg ⇒ Object (readonly)
Returns the value of attribute arg.
3 4 5 |
# File 'lib/dockerfile-rb/copy.rb', line 3 def arg @arg end |
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
3 4 5 |
# File 'lib/dockerfile-rb/copy.rb', line 3 def dest @dest end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
3 4 5 |
# File 'lib/dockerfile-rb/copy.rb', line 3 def group @group end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/dockerfile-rb/copy.rb', line 3 def name @name end |
#src ⇒ Object (readonly)
Returns the value of attribute src.
3 4 5 |
# File 'lib/dockerfile-rb/copy.rb', line 3 def src @src end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/dockerfile-rb/copy.rb', line 3 def user @user end |