Class: PinkShirt::SAX::Acronym
- Defined in:
- lib/pink_shirt/sax/acronym.rb
Constant Summary collapse
- TAGS =
%(acronym)
Instance Method Summary collapse
- #end_acronym ⇒ Object
-
#initialize(*args) ⇒ Acronym
constructor
A new instance of Acronym.
- #start_acronym(attrs) ⇒ Object
Methods inherited from Base
#add_attributes, #method_missing, #to_s
Constructor Details
#initialize(*args) ⇒ Acronym
Returns a new instance of Acronym.
5 6 7 8 |
# File 'lib/pink_shirt/sax/acronym.rb', line 5 def initialize(*args) @current_acronym = [] super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PinkShirt::SAX::Base
Instance Method Details
#end_acronym ⇒ Object
14 15 16 |
# File 'lib/pink_shirt/sax/acronym.rb', line 14 def end_acronym @output << "(#{@current_acronym.pop})" end |
#start_acronym(attrs) ⇒ Object
10 11 12 |
# File 'lib/pink_shirt/sax/acronym.rb', line 10 def start_acronym attrs @current_acronym << attrs['title'] end |