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 = " attr_accessor :\#{attribute}\n def self.\#{attribute}(value=false, &action)\n value ? @\#{attribute} = value : @\#{attribute}_block = action\n end\n def self.\#{attribute}_value_for(inst)\n return @\#{attribute} if @\#{attribute}\n @\#{attribute}_block.call(inst)\n end\n def \#{attribute}\n return @\#{attribute} if @\#{attribute}\n @\#{attribute} = self.class.\#{attribute}_value_for(self)\n end\n" class_eval(script) end end |