Module: HideAttributes::ClassMethods

Defined in:
lib/hide_attributes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hidden_attributesObject (readonly)

Returns the value of attribute hidden_attributes.



10
11
12
# File 'lib/hide_attributes.rb', line 10

def hidden_attributes
  @hidden_attributes
end

Instance Method Details

#hide_attributes(*arr) ⇒ Object

Macro to specify which attributes are to be hidden

hide_attributes :password, :password_salt


7
8
9
# File 'lib/hide_attributes.rb', line 7

def hide_attributes(*arr)
  @hidden_attributes = arr.flatten
end