Sha256: e8bac2ef1833aaab3944916db98fb71ff77dddbb8da36a474f6aa208d81cb626

Contents?: true

Size: 626 Bytes

Versions: 2

Compression:

Stored size: 626 Bytes

Contents

require "private_attr/version"

module PrivateAttr
  def private_attr_accessor *attr
    private_attr_reader *attr
    private_attr_writer *attr
  end

  def private_attr_reader *attr
    attr_reader *attr
    private *attr
  end

  def private_attr_writer *attr
    attr_writer *attr
    private *attr.map { |a| "#{a}=" }
  end

  def protected_attr_accessor *attr
    protected_attr_reader *attr
    protected_attr_writer *attr
  end

  def protected_attr_reader *attr
    attr_reader *attr
    protected *attr
  end

  def protected_attr_writer *attr
    attr_writer *attr
    protected *attr.map { |a| "#{a}=" }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
private_attr-0.1.1 lib/private_attr.rb
private_attr-0.1.0 lib/private_attr.rb