Class: Abbu::Exporters::VcardExporter

Inherits:
Object
  • Object
show all
Defined in:
lib/abbu/exporters/vcard_exporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(contacts) ⇒ VcardExporter

Returns a new instance of VcardExporter.



7
8
9
# File 'lib/abbu/exporters/vcard_exporter.rb', line 7

def initialize(contacts)
  @contacts = contacts
end

Instance Method Details

#to_file(path) ⇒ Object



11
12
13
# File 'lib/abbu/exporters/vcard_exporter.rb', line 11

def to_file(path)
  File.write(path, generate)
end

#to_stdoutObject



15
16
17
# File 'lib/abbu/exporters/vcard_exporter.rb', line 15

def to_stdout
  puts generate
end