Class: Vcloud::Core::Entity
- Inherits:
-
Object
- Object
- Vcloud::Core::Entity
- Defined in:
- lib/vcloud/core/entity.rb
Instance Method Summary collapse
Instance Method Details
#id ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/vcloud/core/entity.rb', line 9 def id raise 'id not found' unless @vcloud_attributes && @vcloud_attributes[:href] extracted_id = @vcloud_attributes[:href].split('/').last unless extracted_id =~ /^#{id_prefix}-[-0-9a-f]+$/ raise "#{id_prefix} id : #{extracted_id} is not in correct format" end extracted_id end |
#id_prefix ⇒ Object
5 6 7 |
# File 'lib/vcloud/core/entity.rb', line 5 def id_prefix; raise 'id_prefix : method missing' end |
#name ⇒ Object
18 19 20 |
# File 'lib/vcloud/core/entity.rb', line 18 def name @vcloud_attributes[:name] end |