Module: Pleiades::Util
- Defined in:
- lib/pleiades/core/util.rb
Overview
Util Modules.
Class Method Summary collapse
Class Method Details
.define_reader(hash) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pleiades/core/util.rb', line 7 def define_reader(hash) hash.instance_eval do hash.each_pair do |key, val| l_val = val.is_a?(Hash) ? Pleiades::Util.define_reader(val) : val define_singleton_method(key.to_s.underscore.to_sym) do l_val end end end hash end |