Class: SparkleFormation::AuditLog

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/sparkle_formation/audit_log.rb

Defined Under Namespace

Classes: Record, SourcePoint

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAuditLog

Returns a new instance of AuditLog



67
68
69
# File 'lib/sparkle_formation/audit_log.rb', line 67

def initialize
  @list = []
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list



65
66
67
# File 'lib/sparkle_formation/audit_log.rb', line 65

def list
  @list
end

Instance Method Details

#<<(item) ⇒ Object Also known as: push



71
72
73
74
75
76
77
78
79
80
# File 'lib/sparkle_formation/audit_log.rb', line 71

def <<(item)
  case item
  when Array
    item = Record.new(*item)
  when Hash
    item = Record.new(item)
  end
  add_item(item)
  item
end

#each(&block) ⇒ Object



84
85
86
# File 'lib/sparkle_formation/audit_log.rb', line 84

def each(&block)
  list.each(&block)
end