Sha256: c305d9f1d59130dee54fd79e586a4bdf587e5e4ab9e4861784ff730c72685a84
Contents?: true
Size: 600 Bytes
Versions: 49
Compression:
Stored size: 600 Bytes
Contents
module Rundock module Attribute class Base def initialize(attr = {}) attr.each { |k, v| define_attr(k.to_sym, v) } end def self.attr_accessor(*vars) @attributes ||= [] @attributes.concat(vars) super(*vars) end def self.list @attributes end def list self.class.list.each_with_object({}) do |a, result| result[a] = self.send(a) end end def define_attr(name, val) self.class.send(:attr_accessor, name) self.send("#{name}=", val) end end end end
Version data entries
49 entries across 49 versions & 1 rubygems