Class: Germinate::Insertion
- Inherits:
-
Object
- Object
- Germinate::Insertion
- Includes:
- SharedStyleAttributes
- Defined in:
- lib/germinate/insertion.rb
Direct Known Subclasses
Constant Summary
Constants included from SharedStyleAttributes
SharedStyleAttributes::TEXT_TRANSFORMS
Instance Attribute Summary collapse
-
#library ⇒ Object
readonly
Returns the value of attribute library.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
-
#initialize(selector, library, template = {}) ⇒ Insertion
constructor
A new instance of Insertion.
- #resolve ⇒ Object
- #to_s ⇒ Object
Methods included from SharedStyleAttributes
#copy_attributes!, #copy_shared_style_attributes_from, #disable_all_transforms!, #shared_style_attributes
Constructor Details
#initialize(selector, library, template = {}) ⇒ Insertion
Returns a new instance of Insertion.
14 15 16 17 18 |
# File 'lib/germinate/insertion.rb', line 14 def initialize(selector, library, template={}) copy_shared_style_attributes_from(template) @selector = selector @library = library end |
Instance Attribute Details
#library ⇒ Object (readonly)
Returns the value of attribute library.
9 10 11 |
# File 'lib/germinate/insertion.rb', line 9 def library @library end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
10 11 12 |
# File 'lib/germinate/insertion.rb', line 10 def selector @selector end |
Instance Method Details
#resolve ⇒ Object
24 25 26 27 28 |
# File 'lib/germinate/insertion.rb', line 24 def resolve returning(library[selector, self, self]) do |hunk| log.debug "Resolved #{self} to #{hunk}" end end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/germinate/insertion.rb', line 20 def to_s "Insertion[#{selector}]" end |