Class: Athena::Formats::XML::RecordSpec
- Defined in:
- lib/athena/formats/xml.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#record ⇒ Object
Returns the value of attribute record.
Instance Method Summary collapse
- #done(context, name) ⇒ Object
-
#initialize(&block) ⇒ RecordSpec
constructor
A new instance of RecordSpec.
- #start(context, name, attrs) ⇒ Object
Methods inherited from BaseSpec
Constructor Details
#initialize(&block) ⇒ RecordSpec
Returns a new instance of RecordSpec.
210 211 212 213 |
# File 'lib/athena/formats/xml.rb', line 210 def initialize(&block) super() @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
207 208 209 |
# File 'lib/athena/formats/xml.rb', line 207 def block @block end |
#record ⇒ Object
Returns the value of attribute record.
208 209 210 |
# File 'lib/athena/formats/xml.rb', line 208 def record @record end |
Instance Method Details
#done(context, name) ⇒ Object
221 222 223 224 225 |
# File 'lib/athena/formats/xml.rb', line 221 def done(context, name) context = super record.close context end |
#start(context, name, attrs) ⇒ Object
215 216 217 218 219 |
# File 'lib/athena/formats/xml.rb', line 215 def start(context, name, attrs) context = super self.record = Athena::Record.new(nil, block, true) context end |