# File lib/occi/core/links.rb, line 5 def initialize(links=[]) links.collect! {|link| convert link} if links super links end
# File lib/occi/core/links.rb, line 10 def <<(link) super convert link end
# File lib/occi/core/links.rb, line 14 def create(*args) link = Occi::Core::Link.new(*args) link.model = @model if @model self << link link end
# File lib/occi/core/links.rb, line 24 def convert(link) if link.kind_of? String link_location = link link = Occi::Core::Link.new link.id = link_location.split('/').last link.location = link_location end link end