Class: Postful::Postcard::Document
- Inherits:
-
Object
- Object
- Postful::Postcard::Document
- Defined in:
- lib/postful/postcard.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#sections ⇒ Object
Returns the value of attribute sections.
Instance Method Summary collapse
- #build_request(builder) ⇒ Object
-
#initialize(template_name) ⇒ Document
constructor
A new instance of Document.
- #requires_upload? ⇒ Boolean
Constructor Details
#initialize(template_name) ⇒ Document
Returns a new instance of Document.
103 104 105 106 |
# File 'lib/postful/postcard.rb', line 103 def initialize(template_name) @template_name = template_name @sections = [] end |
Instance Attribute Details
#sections ⇒ Object
Returns the value of attribute sections.
101 102 103 |
# File 'lib/postful/postcard.rb', line 101 def sections @sections end |
Instance Method Details
#build_request(builder) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/postful/postcard.rb', line 112 def build_request(builder) builder.document do builder.template do builder.source 'gallery' builder.name @template_name end builder.sections do sections.each do |section| section.build_request(builder) end end end end |
#requires_upload? ⇒ Boolean
108 109 110 |
# File 'lib/postful/postcard.rb', line 108 def requires_upload? false end |