Sha256: 81e9b1ea8146eb8dea45876c3e7633fcc1f9cd58372b64c1f63bbb458cb3eacd
Contents?: true
Size: 778 Bytes
Versions: 2
Compression:
Stored size: 778 Bytes
Contents
module VagrantPlugins module Cloudstack module Model class CloudstackResource attr_accessor :id, :name attr_reader :kind def initialize(id, name, kind) raise 'Resource must have a kind' if kind.nil? || kind.empty? @id = id @name = name @kind = kind end def is_undefined? is_id_undefined? and is_name_undefined? end def is_id_undefined? id.nil? || id.empty? end def is_name_undefined? name.nil? || name.empty? end def to_s "#{kind} - #{id || '<unknown id>'}:#{name || '<unknown name>'}" end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-cloudstack-1.3.0 | lib/vagrant-cloudstack/model/cloudstack_resource.rb |
vagrant-cloudstack-1.2.0 | lib/vagrant-cloudstack/model/cloudstack_resource.rb |