class People

Public Class Methods

new() click to toggle source
# File lib/employees/mankind/people.rb, line 2
def initialize()
        @attributes = ""
end

Public Instance Methods

attributes(attrs) click to toggle source
# File lib/employees/mankind/people.rb, line 45
def attributes(attrs)
        p attrs
        attrs.each { |k, v| @attributes += " #{namespace}" + k.to_s + "=\"" + v.to_a[0] + "\"" }
end
capitalize(name) click to toggle source
# File lib/employees/mankind/people.rb, line 39
def capitalize(name)
        name = name.dup
        name[0] = name[0].upcase;
        name
end
class_name() click to toggle source
# File lib/employees/mankind/people.rb, line 50
def class_name
        self.class.to_s
end
do(tasks) click to toggle source
# File lib/employees/mankind/people.rb, line 6
def do(tasks)

end
inject(task) click to toggle source
# File lib/employees/mankind/people.rb, line 21
def inject(task)
        task if typeOf task, is: String
end
inspect() click to toggle source
# File lib/employees/mankind/people.rb, line 17
def inspect
        self.to_s
end
namespace() click to toggle source
# File lib/employees/mankind/people.rb, line 54
def namespace
        nil
end
tag(value=nil) click to toggle source
# File lib/employees/mankind/people.rb, line 25
def tag(value=nil)
        "<#{namespace}#{tag_name}>#{value.to_s}</#{namespace}#{tag_name}> "
end
tag_name() click to toggle source
# File lib/employees/mankind/people.rb, line 29
def tag_name
        uncapitalize self.class.to_s
end
typeOf(task, args={}) click to toggle source
# File lib/employees/mankind/people.rb, line 10
def typeOf(task, args={})
        raise ArgumentError "Set check type" if args == {}
        type = args[:is] || args[:is_not]
        return task.class == type if not args[:is].nil?
        return task.class != type if not args[:is_not].nil?
end
uncapitalize(name) click to toggle source
# File lib/employees/mankind/people.rb, line 33
def uncapitalize(name)
        name = name.dup
        name[0] = name[0].downcase;
        name
end