Class: Weatherboy::Alert
- Inherits:
-
Object
- Object
- Weatherboy::Alert
- Defined in:
- lib/weatherboy/alert.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(doc) ⇒ Alert
constructor
A new instance of Alert.
Constructor Details
#initialize(doc) ⇒ Alert
Returns a new instance of Alert.
6 7 8 9 10 |
# File 'lib/weatherboy/alert.rb', line 6 def initialize(doc) @description = doc.elements['description'].text @date = doc.elements['date'].text = doc.elements['message'].text end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
4 5 6 |
# File 'lib/weatherboy/alert.rb', line 4 def date @date end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/weatherboy/alert.rb', line 4 def description @description end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/weatherboy/alert.rb', line 4 def end |