Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/slippery.rb

Overview

Core extension

Instance Method Summary collapse

Instance Method Details

#private_attr_accessor(*args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Like attr_accessor, but only available inside the class

Parameters:

  • args (Array<Symbol>)

    The attributes to define



22
23
24
25
26
# File 'lib/slippery.rb', line 22

def private_attr_accessor(*args)
  attr_accessor(*args)
  private(*args)
  private(*args.map {|method| "#{method}=".intern })
end