Class: UIC::Property
- Inherits:
-
Object
show all
- Defined in:
- lib/ruic/attributes.rb
Defined Under Namespace
Classes: Boolean, Float, Image, Long, ObjectRef, ObjectReference, String, Texture, Vector, VectorValue
Constant Summary
collapse
- MultiLineString =
String
- Rotation =
Vector
- Color =
Vector
- Float2 =
Vector
- Import =
String
- Mesh =
String
- Renderable =
String
- Font =
String
- FontSize =
Long
- StringListOrInt =
String
Class Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(el) ⇒ Property
Returns a new instance of Property.
4
|
# File 'lib/ruic/attributes.rb', line 4
def initialize(el); @el = el; end
|
Class Attribute Details
.default ⇒ Object
Returns the value of attribute default.
3
4
5
|
# File 'lib/ruic/attributes.rb', line 3
def default
@default
end
|
Instance Method Details
#default ⇒ Object
11
|
# File 'lib/ruic/attributes.rb', line 11
def default; @def ||= (@el['default'] || self.class.default); end
|
#description ⇒ Object
10
|
# File 'lib/ruic/attributes.rb', line 10
def description; @desc||=@el['description']; end
|
7
|
# File 'lib/ruic/attributes.rb', line 7
def formal; @formal||=@el['formalName'] || @el['name']; end
|
#get(asset, slide) ⇒ Object
12
13
14
15
16
|
# File 'lib/ruic/attributes.rb', line 12
def get(asset,slide)
if asset.slide? || asset.has_slide?(slide)
asset.presentation.get_attribute(asset.el,name,slide) || default
end
end
|
#inspect ⇒ Object
20
21
22
|
# File 'lib/ruic/attributes.rb', line 20
def inspect
"<#{type} '#{name}'>"
end
|
#max ⇒ Object
9
|
# File 'lib/ruic/attributes.rb', line 9
def max; @el['max']; end
|
#min ⇒ Object
8
|
# File 'lib/ruic/attributes.rb', line 8
def min; @el['min']; end
|
#name ⇒ Object
5
|
# File 'lib/ruic/attributes.rb', line 5
def name; @name||=@el['name']; end
|
#set(asset, new_value, slide_name_or_index) ⇒ Object
17
18
19
|
# File 'lib/ruic/attributes.rb', line 17
def set(asset,new_value,slide_name_or_index)
asset.presentation.set_attribute(asset.el,name,slide_name_or_index,new_value)
end
|
#type ⇒ Object
6
|
# File 'lib/ruic/attributes.rb', line 6
def type; @type||=@el['type']; end
|