Sha256: c09410a189aeb4ba772f66854da089ee506c41738984d674da7ebafe6ed2d8b0
Contents?: true
Size: 402 Bytes
Versions: 3
Compression:
Stored size: 402 Bytes
Contents
# -*- coding: utf-8 -*- module Xot module Setter def set (*args) return if args.empty? first = args.shift if first.class == Hash first.each {|name, value| set_value__ name, value} else set_value__ first, *args end end private def set_value__ (name, *value) __send__ name.to_s + '=', *value end end# Setter end# Xot
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
xot-0.1.6 | lib/xot/setter.rb |
xot-0.1.5 | lib/xot/setter.rb |
xot-0.1.4 | lib/xot/setter.rb |