module Hoick::Command::PayloadOptions
Public Instance Methods
payload()
click to toggle source
# File lib/hoick/command.rb, line 110 def payload if file File.read(file) else $stdin.read end end
Protected Instance Methods
default_content_type()
click to toggle source
# File lib/hoick/command.rb, line 120 def default_content_type (mime_type_of(file) if file) || "application/octet-stream" end
mime_type_of(filename_or_ext)
click to toggle source
# File lib/hoick/command.rb, line 124 def mime_type_of(filename_or_ext) resolved_type = MIME::Types.of(filename_or_ext).first resolved_type.to_s if resolved_type end