Sha256: c309ecf0da2ffb2e049c7a4a2f3cc3df22594ba56ed75d58689ef1f8214f2065
Contents?: true
Size: 578 Bytes
Versions: 54
Compression:
Stored size: 578 Bytes
Contents
module Inbox module Parameters def self.included(base) base.extend(ClassMethods) end def parameters self.class.instance_variable_get("@parameters") end module ClassMethods def parameter(*params) @parameters ||= [] params.each do |param| attr_accessor param @parameters << param.to_s end end def inherited(subclass) parameters = instance_variable_get("@parameters") || [] subclass.instance_variable_set("@parameters", parameters.clone) end end end end
Version data entries
54 entries across 54 versions & 2 rubygems