Method: Atlas::BoxVersion.create

Defined in:
lib/atlas/box_version.rb

.create(box_tag, attr = {}) ⇒ Version

Create a new version.

Parameters:

  • box_tag (String)

    the box tag to create the version under.

  • attr (Hash) (defaults to: {})

    attributes to create the version with.

  • attr (String) (defaults to: {})

    :version The version number.

  • attr (String) (defaults to: {})

    :description Description of the box.

Returns:

  • (Version)

    a newly created version.



37
38
39
40
41
42
# File 'lib/atlas/box_version.rb', line 37

def self.create(box_tag, attr = {})
  tag = "#{box_tag}/#{attr[:version]}"
  version = new(tag, attr)
  version.save
  version
end