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.
387 388 389 390 391 392 393 394 395 396 |
# File 'lib/ruic/assets.rb', line 387 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
400 401 402 |
# File 'lib/ruic/assets.rb', line 400 def []() @property.get( @asset, ) end |
#[]=(slide_name_or_index, new_value) ⇒ Object
403 404 405 |
# File 'lib/ruic/assets.rb', line 403 def []=(,new_value) @property.set( @asset, new_value, ) end |
#inspect ⇒ Object Also known as: to_s
418 419 420 |
# File 'lib/ruic/assets.rb', line 418 def inspect "<Values of '#{@asset.name}.#{@property.name}' across slides>" end |
#link ⇒ Object
412 413 414 |
# File 'lib/ruic/assets.rb', line 412 def link @preso.link_attribute( @asset, @property.name ) end |
#linked? ⇒ Boolean
406 407 408 |
# File 'lib/ruic/assets.rb', line 406 def linked? @preso.attribute_linked?( @asset, @property.name ) end |
#unlink ⇒ Object
409 410 411 |
# File 'lib/ruic/assets.rb', line 409 def unlink @preso.unlink_attribute( @asset, @property.name ) end |
#value ⇒ Object
397 398 399 |
# File 'lib/ruic/assets.rb', line 397 def value values.first end |
#values ⇒ Object
415 416 417 |
# File 'lib/ruic/assets.rb', line 415 def values @asset..map{ |s| self[s.name] } end |