module AttrInit
Constants
- VERSION
Public Class Methods
add_new_attrs(scope, attrs)
click to toggle source
# File lib/attr_init.rb, line 68 def self.add_new_attrs(scope, attrs) begin hidden_attrs = get_attrs(scope.superclass) scope.class_variable_set hidden_attrs_variable_name, hidden_attrs + attrs rescue NameError => e scope.class_variable_set hidden_attrs_variable_name, Set.new(attrs) end end
get_attrs(scope)
click to toggle source
# File lib/attr_init.rb, line 77 def self.get_attrs(scope) scope.class_variable_get hidden_attrs_variable_name end