class SendWithUs::File
Attributes
attachment[RW]
Public Class Methods
new(file_data, opts = {})
click to toggle source
# File lib/send_with_us/file.rb, line 5 def initialize(file_data, opts = {}) @attachment = if file_data.is_a?(String) SendWithUs::Attachment.new(file_data) else if file_data[:data] and file_data[:id] file_data else SendWithUs::Attachment.new(file_data[:attachment], file_data[:filename]) end end end
Public Instance Methods
to_h()
click to toggle source
# File lib/send_with_us/file.rb, line 17 def to_h attachment.to_h end