lib/PinPress/templates/template.rb in pinpress-1.0.2 vs lib/PinPress/templates/template.rb in pinpress-1.1.0
- old
+ new
@@ -1,16 +1,41 @@
module PinPress
+ # A template for outputting Pinboard data
class Template
+ # Defines a pin template
+ # @return [Fixnum]
TEMPLATE_TYPE_PIN = 1
+
+ # Defines a tag template
+ # @return [Fixnum]
TEMPLATE_TYPE_TAG = 2
+ # Holds the "closer" (the string that
+ # should come after all template items
+ # are output)
+ # @return [String]
attr_accessor :closer
+
+ # Holds the string that defines what
+ # an item should look like.
+ # @return [String]
attr_accessor :item
- attr_accessor :item_separator
+
+ # Holds the name of the template.
+ # @return [String]
attr_accessor :name
+
+ # Holds the "opener" (the string that
+ # should come before all template items
+ # are output)
+ # @return [String]
attr_accessor :opener
+ # Initializes this class by ingesting
+ # passed parameters.
+ # @param [Hash]
+ # @return [void]
def initialize(params = {})
params.each { |key, value| send("#{ key }=", value) }
end
end
-end
\ No newline at end of file
+end