Finally got all the zones configured properly and transferred to my DNS server. In celebration, here are some additions to the Vector class. Enjoy.
require 'matrix'
class Vector
def include?(search_term)
self.to_a.include?(search_term)
end
def to_float
new_elements = []
self.to_a.each do |element|
element = element.to_f if element.class == Fixnum
new_elements << element
end
Vector.elements(new_elements)
end
def pretty
counter = 0
self.map do |element|
puts "[#{counter}] = #{element}"
counter += 1
end
end
def empty?
return true if self.nil?
empty = true
self.map do |element|
if case(element)
when Fixnum
element == 0
when nil
true
when String
element.empty? or element == ' '
when Float
element == 0.0
end
next
else
empty = false
break
end
end
empty
end
def self.random(size, max_value = 50)
elements = []
(1..size).each do |i|
elements << rand(max_value) + 1
end
Vector.elements(elements)
end
end
