Class: Kamelopard::Snippet
- Inherits:
-
Object
- Object
- Kamelopard::Snippet
- Defined in:
- lib/kamelopard/classes.rb
Overview
Support class for Feature object
Instance Attribute Summary collapse
-
#maxLines ⇒ Object
Returns the value of attribute maxLines.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text = nil, maxLines = 2) ⇒ Snippet
constructor
A new instance of Snippet.
- #to_kml(elem = nil) ⇒ Object
Constructor Details
#initialize(text = nil, maxLines = 2) ⇒ Snippet
Returns a new instance of Snippet.
544 545 546 547 |
# File 'lib/kamelopard/classes.rb', line 544 def initialize(text = nil, maxLines = 2) @text = text @maxLines = maxLines end |
Instance Attribute Details
#maxLines ⇒ Object
Returns the value of attribute maxLines.
543 544 545 |
# File 'lib/kamelopard/classes.rb', line 543 def maxLines @maxLines end |
#text ⇒ Object
Returns the value of attribute text.
543 544 545 |
# File 'lib/kamelopard/classes.rb', line 543 def text @text end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
549 550 551 552 553 554 555 |
# File 'lib/kamelopard/classes.rb', line 549 def to_kml(elem = nil) e = REXML::Element.new 'Snippet' e.attributes['maxLines'] = @maxLines e.text = @text elem.elements << e unless elem.nil? e end |