Class: RubyPoint::Element
- Inherits:
-
Object
- Object
- RubyPoint::Element
- Defined in:
- lib/rubypoint/element.rb
Direct Known Subclasses
App::Slide, ContentTypes::XML::Slide, File, Presentation::Presentation::Slide, Relationship, TextField
Instance Attribute Summary collapse
-
#objects ⇒ Object
Returns the value of attribute objects.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#presentation ⇒ Object
Returns the value of attribute presentation.
Class Method Summary collapse
Instance Attribute Details
#objects ⇒ Object
Returns the value of attribute objects.
4 5 6 |
# File 'lib/rubypoint/element.rb', line 4 def objects @objects end |
#parent ⇒ Object
Returns the value of attribute parent.
4 5 6 |
# File 'lib/rubypoint/element.rb', line 4 def parent @parent end |
#presentation ⇒ Object
Returns the value of attribute presentation.
4 5 6 |
# File 'lib/rubypoint/element.rb', line 4 def presentation @presentation end |
Class Method Details
.class_attributes(*args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubypoint/element.rb', line 7 def class_attributes(*args) args.each do |attribute| script = <<EOF attr_accessor :#{attribute} def self.#{attribute}(value=false, &action) value ? @#{attribute} = value : @#{attribute}_block = action end def self.#{attribute}_value_for(inst) return @#{attribute} if @#{attribute} @#{attribute}_block.call(inst) end def #{attribute} return @#{attribute} if @#{attribute} @#{attribute} = self.class.#{attribute}_value_for(self) end EOF class_eval(script) end end |