Class: Imagemaster3000::Entities::Image
- Inherits:
-
Object
- Object
- Imagemaster3000::Entities::Image
- Includes:
- Downloadable
- Defined in:
- lib/imagemaster3000/entities/image.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#cpu ⇒ Object
Returns the value of attribute cpu.
-
#distribution ⇒ Object
Returns the value of attribute distribution.
-
#local_filename ⇒ Object
Returns the value of attribute local_filename.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ram ⇒ Object
Returns the value of attribute ram.
-
#remote_filename ⇒ Object
Returns the value of attribute remote_filename.
-
#size ⇒ Object
Returns the value of attribute size.
-
#url ⇒ Object
Returns the value of attribute url.
-
#verification ⇒ Object
Returns the value of attribute verification.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(name: nil, url: nil, distribution: nil, version: nil, ram: nil, cpu: nil, actions: nil, verification: nil) ⇒ Image
constructor
A new instance of Image.
Methods included from Downloadable
Constructor Details
#initialize(name: nil, url: nil, distribution: nil, version: nil, ram: nil, cpu: nil, actions: nil, verification: nil) ⇒ Image
Returns a new instance of Image.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/imagemaster3000/entities/image.rb', line 8 def initialize(name: nil, url: nil, distribution: nil, version: nil, ram: nil, cpu: nil, actions: nil, verification: nil) raise Imagemaster3000::Errors::ArgumentError, 'name, url, distribution or version cannot be nil' \ if name.blank? || url.blank? || distribution.blank? || version.blank? @name = name @url = url @distribution = distribution @version = version @ram = ram @cpu = cpu @actions = prepare_actions actions @verification = prepare_verification verification logger.debug "Created image #{inspect}" end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def actions @actions end |
#cpu ⇒ Object
Returns the value of attribute cpu.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def cpu @cpu end |
#distribution ⇒ Object
Returns the value of attribute distribution.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def distribution @distribution end |
#local_filename ⇒ Object
Returns the value of attribute local_filename.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def local_filename @local_filename end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def name @name end |
#ram ⇒ Object
Returns the value of attribute ram.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def ram @ram end |
#remote_filename ⇒ Object
Returns the value of attribute remote_filename.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def remote_filename @remote_filename end |
#size ⇒ Object
Returns the value of attribute size.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def size @size end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def url @url end |
#verification ⇒ Object
Returns the value of attribute verification.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def verification @verification end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/imagemaster3000/entities/image.rb', line 6 def version @version end |