Class: Postful::Postcard

Inherits:
Base
  • Object
show all
Defined in:
lib/postful/postcard.rb

Overview

Builder for mailing postcards with the Postful Web Service.

Defined Under Namespace

Classes: Document, Section

Constant Summary collapse

FIT =
'Postcard: Image fit front'
FILL =
'Postcard: Image fill front'
IMAGES =
'Postcard: Image front and back'

Instance Attribute Summary collapse

Attributes inherited from Base

#return_address, #sections, #tag1, #tag2, #tag3

Instance Method Summary collapse

Methods inherited from Base

#add_address, #add_document, #add_international_address, #errors, #initialize, #mail!, #valid?

Constructor Details

This class inherits a constructor from Postful::Base

Instance Attribute Details

#back_imageObject

Returns the value of attribute back_image.



14
15
16
# File 'lib/postful/postcard.rb', line 14

def back_image
  @back_image
end

#back_textObject

Returns the value of attribute back_text.



15
16
17
# File 'lib/postful/postcard.rb', line 15

def back_text
  @back_text
end

#front_imageObject

Returns the value of attribute front_image.



13
14
15
# File 'lib/postful/postcard.rb', line 13

def front_image
  @front_image
end

Instance Method Details

#add_borderObject



25
26
27
# File 'lib/postful/postcard.rb', line 25

def add_border
  @border = true
end

#back_image_from_file=(filename) ⇒ Object



21
22
23
# File 'lib/postful/postcard.rb', line 21

def back_image_from_file=(filename)
  @back_image = get_file(filename)
end

#front_image_from_file=(filename) ⇒ Object



17
18
19
# File 'lib/postful/postcard.rb', line 17

def front_image_from_file=(filename)
  @front_image = get_file(filename)
end