module PrivateStruct
Constants
- VERSION
Public Class Methods
new(*attributes, &block)
click to toggle source
# File lib/private_struct.rb, line 4 def self.new(*attributes, &block) struct = Struct.new(*attributes, &block) struct.instance_eval do attributes.each do |attribite| private attribite, "#{attribite}=" end end struct end