Class: ActiverecordReadonly::Current

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(be_readonly, excepts = [], only = []) ⇒ Current

Returns a new instance of Current.



9
10
11
12
13
# File 'lib/activerecord_readonly/current.rb', line 9

def initialize(be_readonly, excepts = [], only = [])
  @be_readonly = be_readonly
  @excepts = excepts
  @only = only
end

Instance Attribute Details

#be_readonlyObject (readonly)

Returns the value of attribute be_readonly.



5
6
7
# File 'lib/activerecord_readonly/current.rb', line 5

def be_readonly
  @be_readonly
end

#exceptsObject (readonly)

Returns the value of attribute excepts.



6
7
8
# File 'lib/activerecord_readonly/current.rb', line 6

def excepts
  @excepts
end

#onlyObject (readonly)

Returns the value of attribute only.



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

def only
  @only
end