Class: RedDavis

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

Instance Method Summary collapse

Instance Method Details

#blogObject

Opens a browser window and sends you to my blog (Not tested on Windows)


22
23
24
# File 'lib/red_davis.rb', line 22

def blog
  system("open #{blog_url}")
end

#contact_detailsObject

My contact details


65
66
67
68
69
70
# File 'lib/red_davis.rb', line 65

def contact_details
  {
    :email => '[email protected]',
    :phone => '07515353733'
  }
end

#hired!(options = {}) ⇒ Object

Hire me!

  • :from => Who you are

  • :body => A little message

  • :subject => Subject of the email


59
60
61
62
# File 'lib/red_davis.rb', line 59

def hired!(options={})    
  raise "You need to specify from, subject and body" unless options.key?(:from) || options.key?(:body) || options.key?(:subject)
  Pony.mail({:to => '[email protected]'}.merge(options))
end

#interested_inObject


26
27
28
29
30
31
32
33
34
# File 'lib/red_davis.rb', line 26

def interested_in
  [
    'Machine Learning',
    'Data',
    'Ruby',
    'Rails',
    'Fun things'
  ]
end

#locationObject


13
14
15
16
17
18
19
# File 'lib/red_davis.rb', line 13

def location
  {
    :country => 'England',
    :city => 'Bath',
    :google_map => "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Bath,+Avon,+United+Kingdom&sll=37.0625,-95.677068&sspn=55.981213,108.544922&ie=UTF8&hq=&hnear=Bath,+Avon,+United+Kingdom&z=13"
  }
end

Print out all basic information


48
49
50
51
52
53
# File 'lib/red_davis.rb', line 48

def print
  text = File.expand_path(File.dirname(__FILE__) + '/text/cv.txt')
  File.readlines(text).each do |line|
    puts line
  end
end

#projectsObject

Returns a hash containg info about all my current OS projects on Github


8
9
10
11
# File 'lib/red_davis.rb', line 8

def projects
  request = Net::HTTP.get(URI.parse(github_profile_url))
  JSON.parse(request)
end

#share_with(from, *emails) ⇒ Object

Shared me CV with fellow co-workers. Sends them a URL to download this CV


73
74
75
76
77
78
79
80
# File 'lib/red_davis.rb', line 73

def share_with(from, *emails)
  emails.each do |email|
    Pony.mail(:to => email, 
              :from => from, 
              :subject => 'Hey what do you think of this guy...', 
              :body => github_cv_url)
  end
end

#work_experienceObject


36
37
38
39
40
41
42
43
44
45
# File 'lib/red_davis.rb', line 36

def work_experience
  {
    :green_thing => {
                      :url => 'http://dothegreenthing.com',
                      :position => 'Lead Developer',
                      :started => Time.local(2008, 'apr', 1),
                      :finished => nil
                    }
  }
end