Class: GEvent
- Inherits:
-
Object
- Object
- GEvent
- Defined in:
- lib/gcal.rb
Instance Attribute Summary collapse
-
#author_email ⇒ Object
Returns the value of attribute author_email.
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#content ⇒ Object
Returns the value of attribute content.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#id ⇒ Object
Returns the value of attribute id.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#title ⇒ Object
Returns the value of attribute title.
-
#where ⇒ Object
Returns the value of attribute where.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ GEvent
constructor
A new instance of GEvent.
- #to_html ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ GEvent
Returns a new instance of GEvent.
29 30 31 |
# File 'lib/gcal.rb', line 29 def initialize(hash={}) hash.each {|k,v| self.send("#{k}=",v)} end |
Instance Attribute Details
#author_email ⇒ Object
Returns the value of attribute author_email.
27 28 29 |
# File 'lib/gcal.rb', line 27 def end |
#author_name ⇒ Object
Returns the value of attribute author_name.
27 28 29 |
# File 'lib/gcal.rb', line 27 def end |
#content ⇒ Object
Returns the value of attribute content.
27 28 29 |
# File 'lib/gcal.rb', line 27 def content @content end |
#end_time ⇒ Object
Returns the value of attribute end_time.
27 28 29 |
# File 'lib/gcal.rb', line 27 def end_time @end_time end |
#id ⇒ Object
Returns the value of attribute id.
27 28 29 |
# File 'lib/gcal.rb', line 27 def id @id end |
#start_time ⇒ Object
Returns the value of attribute start_time.
27 28 29 |
# File 'lib/gcal.rb', line 27 def start_time @start_time end |
#title ⇒ Object
Returns the value of attribute title.
27 28 29 |
# File 'lib/gcal.rb', line 27 def title @title end |
#where ⇒ Object
Returns the value of attribute where.
27 28 29 |
# File 'lib/gcal.rb', line 27 def where @where end |
Instance Method Details
#to_html ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/gcal.rb', line 33 def to_html content = " <div class=\"event\" id=\"\#{self.id}\">\n <h3>\#{self.title}</h3>\n <p class=\"content\">\#{self.content}<br/>\#{self.start_time} - \#{self.end_time}<br/>\#{self.where}</p>\n <p class=\"author\">\#{self.author_name}<br/>\#{self.author_email}</p>\n </div>\n EOF\nend\n" |