class UIC::Property

encoding: utf-8

Constants

Color
Float2
FontSize
Import
Mesh
MultiLineString
Renderable
Rotation
StringListOrInt

Attributes

default[RW]
default[RW]

…and instances of a particular property can have their own default value

Public Class Methods

new(el) click to toggle source
# File lib/ruic/attributes.rb, line 8
def initialize(el); @el = el; end

Public Instance Methods

description() click to toggle source
# File lib/ruic/attributes.rb, line 14
def description; @desc||=@el['description']; end
formal() click to toggle source
# File lib/ruic/attributes.rb, line 11
def formal; @formal||=@el['formalName'] || @el['name']; end
get(asset,slide) click to toggle source
# File lib/ruic/attributes.rb, line 16
def get(asset,slide)
        if asset.slide? || asset.has_slide?(slide)
                asset.presentation.get_attribute(asset,name,slide) || default
        end
end
inspect() click to toggle source
# File lib/ruic/attributes.rb, line 24
def inspect
        "<#{type} '#{name}'>"
end
max() click to toggle source
# File lib/ruic/attributes.rb, line 13
def max; @el['max']; end
min() click to toggle source
# File lib/ruic/attributes.rb, line 12
def min; @el['min']; end
name() click to toggle source
# File lib/ruic/attributes.rb, line 9
def name; @name||=@el['name']; end
set(asset,new_value,slide_name_or_index) click to toggle source
# File lib/ruic/attributes.rb, line 21
def set(asset,new_value,slide_name_or_index)
        asset.presentation.set_attribute(asset,name,slide_name_or_index,new_value)
end
type() click to toggle source
# File lib/ruic/attributes.rb, line 10
def type; @type||=@el['type'] ? (@el['type']=='float' ? 'Float' : @el['type']) : 'Float'; end