Class: ODDB::View::Doctors::VCard

Inherits:
VCard show all
Defined in:
src/view/doctors/vcard.rb

Instance Method Summary (collapse)

Methods inherited from VCard

#addr_str, #addresses, #email, #get_fons, #get_value, #http_headers, #prepare, #title, #to_html

Methods inherited from HtmlGrid::Component

#additional_javascripts, #dynamic_html

Instance Method Details

- (Object) get_filename



14
15
16
17
# File 'src/view/doctors/vcard.rb', line 14

def get_filename
  filename = @model.name.sub(/\s/u, '_').to_s +
    "_" + @model.firstname.sub(/\s/u, '_').to_s + ".vcf"
end

- (Object) init



11
12
13
# File 'src/view/doctors/vcard.rb', line 11

def init
  @content = [:name, :title, :email, :addresses]
end

- (Object) name



18
19
20
21
22
23
24
25
26
# File 'src/view/doctors/vcard.rb', line 18

def name
  if((firstname = @model.firstname) \
    && (name = @model.name))
    [
      "FN;CHARSET=UTF-8:" + firstname + " " + name,
      "N;CHARSET=UTF-8:" + name + ";" + firstname,
    ]
  end
end