Class: UIC::Property::ObjectRef

Inherits:
UIC::Property show all
Defined in:
lib/ruic/attributes.rb

Constant Summary

Constants inherited from UIC::Property

Color, Float2, FontSize, Import, Mesh, MultiLineString, Renderable, Rotation, StringListOrInt

Instance Attribute Summary

Attributes inherited from UIC::Property

#default

Instance Method Summary collapse

Methods inherited from UIC::Property

#description, #formal, #initialize, #inspect, #max, #min, #name, #type

Constructor Details

This class inherits a constructor from UIC::Property

Instance Method Details

#get(asset, slide) ⇒ Object



85
86
87
88
89
90
91
92
93
94
# File 'lib/ruic/attributes.rb', line 85

def get(asset,slide)
  ref  = super
  type = :absolute
  obj  = nil
  unless ref=='' || ref.nil?
    type = ref[0]=='#' ? :absolute : :path
    ref = type==:absolute ? asset.presentation.asset_by_id( ref[1..-1] ) : asset.presentation.at( ref, asset )
  end
  ObjectReference.new(asset,self,slide,ref,type)
end

#set(asset, new_object, slide) ⇒ Object



95
96
97
# File 'lib/ruic/attributes.rb', line 95

def set(asset,new_object,slide)
  get(asset,slide).object = new_object
end