Project

General

Profile

Download (363 Bytes) Statistics
| Branch: | Tag: | Revision:
require 'ostruct'

class Hash
def to_ostruct
data = self.dup
data.each_pair do |k, v|
data[k] = v.to_ostruct if v.is_a?(Hash)
end
OpenStruct.new(data)
end
end

class Object
def logger
CyborgHood::Logger.instance
end

def self.human_name
self.name.split("::").last
end
def human_name
self.class.human_name
end
end
(3-3/4)