class PixxxerTemplate

Public Class Methods

new() click to toggle source
# File lib/pixxxer/template.rb, line 4
def initialize
        @fields = {}
end

Public Instance Methods

add_field(field_name) click to toggle source
# File lib/pixxxer/template.rb, line 7
def add_field(field_name)
        @fields[field_name] = PixxxerField.new(field_name, self)
        @fields[field_name]
end
depixxxit(string) click to toggle source
# File lib/pixxxer/template.rb, line 11
def depixxxit(string)
        record = {}
        @fields.each do |field_name, field|
                record[field_name] = field.depixxxit string
        end
        record
end
pixxxit(hash) click to toggle source
# File lib/pixxxer/template.rb, line 18
def pixxxit(hash)
        string = ''
        @fields.each do |field_name, field|
                string = field.pixxxit hash, string
        end
        string
end