Class: Copper::DataTypes::Image

Inherits:
DataType
  • Object
show all
Defined in:
lib/copper/data_types/image.rb

Constant Summary

Constants inherited from DataType

DataType::CLASS_MAP, DataType::DATATYPE_MAP

Instance Method Summary collapse

Methods inherited from DataType

#as, factory, get_class, #value

Constructor Details

#initialize(value) ⇒ Image

Returns a new instance of Image.



5
6
7
8
9
10
11
# File 'lib/copper/data_types/image.rb', line 5

def initialize(value)
	if value.is_a?(::String)
		@value = deconstruct_image(value)
	else
		@value = value
	end
end

Instance Method Details

#fqinObject



33
34
35
# File 'lib/copper/data_types/image.rb', line 33

def fqin
	@value[:fqin]
end

#nameObject



21
22
23
# File 'lib/copper/data_types/image.rb', line 21

def name
	@value[:name]
end

#registryObject



17
18
19
# File 'lib/copper/data_types/image.rb', line 17

def registry
	@value[:registry]
end

#registry_urlObject



29
30
31
# File 'lib/copper/data_types/image.rb', line 29

def registry_url
	@value[:registry_url]
end

#tagObject



25
26
27
# File 'lib/copper/data_types/image.rb', line 25

def tag
	@value[:tag]
end

#to_sObject



13
14
15
# File 'lib/copper/data_types/image.rb', line 13

def to_s
	@value.to_s
end