class Standupguy::EmailReport
Basically a text report that is outputted to a mailto link. Only supports the Mac OS operating system at the moment.
Public Instance Methods
mac?()
click to toggle source
# File lib/Standupguy.rb, line 167 def mac? Launchy::Detect::HostOs.new.host_os.start_with?("darwin") end
render()
click to toggle source
# File lib/Standupguy.rb, line 162 def render ::Haml::Engine.new(template("report.email.haml")). render(Object.new, standup: data(@date)) end
show()
click to toggle source
# File lib/Standupguy.rb, line 152 def show @date = !date.nil? ? date : date_key(:today) body = render parameters = ::URI.encode_www_form([ ["subject", "StandUp for #{date_key(:today)}"], ["body", body]]) link = "mailto:?#{parameters}" Kernel.system("open '#{link}'") if mac? end