Class: LabTech::DefaultCleaner::RecordPlaceholder

Inherits:
Object
  • Object
show all
Defined in:
app/models/lab_tech/default_cleaner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordPlaceholder

Returns a new instance of RecordPlaceholder.



13
14
15
16
# File 'app/models/lab_tech/default_cleaner.rb', line 13

def initialize( record )
  @class_name = record.class.to_s
  @id         = record.id
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



12
13
14
# File 'app/models/lab_tech/default_cleaner.rb', line 12

def class_name
  @class_name
end

#idObject (readonly)

Returns the value of attribute id.



12
13
14
# File 'app/models/lab_tech/default_cleaner.rb', line 12

def id
  @id
end

Instance Method Details

#inspectObject



22
23
24
# File 'app/models/lab_tech/default_cleaner.rb', line 22

def inspect
  "<#{class_name} ##{id}>"
end

#to_aObject



18
19
20
# File 'app/models/lab_tech/default_cleaner.rb', line 18

def to_a
  [ class_name, id ]
end