Class: GEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/gcal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_emailObject

Returns the value of attribute author_email.



27
28
29
# File 'lib/gcal.rb', line 27

def author_email
  @author_email
end

#author_nameObject

Returns the value of attribute author_name.



27
28
29
# File 'lib/gcal.rb', line 27

def author_name
  @author_name
end

#contentObject

Returns the value of attribute content.



27
28
29
# File 'lib/gcal.rb', line 27

def content
  @content
end

#end_timeObject

Returns the value of attribute end_time.



27
28
29
# File 'lib/gcal.rb', line 27

def end_time
  @end_time
end

#idObject

Returns the value of attribute id.



27
28
29
# File 'lib/gcal.rb', line 27

def id
  @id
end

#start_timeObject

Returns the value of attribute start_time.



27
28
29
# File 'lib/gcal.rb', line 27

def start_time
  @start_time
end

#titleObject

Returns the value of attribute title.



27
28
29
# File 'lib/gcal.rb', line 27

def title
  @title
end

#whereObject

Returns the value of attribute where.



27
28
29
# File 'lib/gcal.rb', line 27

def where
  @where
end

Instance Method Details

#to_htmlObject



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"