Class: UIC::ValuesPerSlide
- Inherits:
-
Object
- Object
- UIC::ValuesPerSlide
- Defined in:
- lib/ruic/assets.rb
Instance Method Summary collapse
- #[](slide_name_or_index) ⇒ Object
- #[]=(slide_name_or_index, new_value) ⇒ Object
-
#initialize(presentation, asset, property) ⇒ ValuesPerSlide
constructor
A new instance of ValuesPerSlide.
- #inspect ⇒ Object (also: #to_s)
- #link ⇒ Object
- #linked? ⇒ Boolean
- #unlink ⇒ Object
- #value ⇒ Object
- #values ⇒ Object
Constructor Details
#initialize(presentation, asset, property) ⇒ ValuesPerSlide
Returns a new instance of ValuesPerSlide.
368 369 370 371 372 373 374 375 376 377 |
# File 'lib/ruic/assets.rb', line 368 def initialize(presentation,asset,property) raise unless presentation.is_a?(UIC::Presentation) raise unless asset.is_a?(UIC::MetaData::AssetBase) raise unless property.is_a?(UIC::Property) @preso = presentation @asset = asset @el = asset.el @property = property end |
Instance Method Details
#[](slide_name_or_index) ⇒ Object
381 382 383 |
# File 'lib/ruic/assets.rb', line 381 def []() @property.get( @asset, ) end |
#[]=(slide_name_or_index, new_value) ⇒ Object
384 385 386 |
# File 'lib/ruic/assets.rb', line 384 def []=(,new_value) @property.set( @asset, new_value, ) end |
#inspect ⇒ Object Also known as: to_s
399 400 401 |
# File 'lib/ruic/assets.rb', line 399 def inspect "<Values of '#{@asset.name}.#{@property.name}' across slides>" end |
#link ⇒ Object
393 394 395 |
# File 'lib/ruic/assets.rb', line 393 def link @preso.link_attribute( @asset, @property.name ) end |
#linked? ⇒ Boolean
387 388 389 |
# File 'lib/ruic/assets.rb', line 387 def linked? @preso.attribute_linked?( @asset, @property.name ) end |
#unlink ⇒ Object
390 391 392 |
# File 'lib/ruic/assets.rb', line 390 def unlink @preso.unlink_attribute( @asset, @property.name ) end |
#value ⇒ Object
378 379 380 |
# File 'lib/ruic/assets.rb', line 378 def value values.first end |
#values ⇒ Object
396 397 398 |
# File 'lib/ruic/assets.rb', line 396 def values @asset..map{ |s| self[s.name] } end |