Class: SparkleFormation::AuditLog
- Inherits:
-
Object
- Object
- SparkleFormation::AuditLog
- Includes:
- Enumerable
- Defined in:
- lib/sparkle_formation/audit_log.rb
Defined Under Namespace
Classes: Record, SourcePoint
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Instance Method Summary collapse
- #<<(item) ⇒ Object (also: #push)
- #each(&block) ⇒ Object
-
#initialize ⇒ AuditLog
constructor
A new instance of AuditLog.
Constructor Details
#initialize ⇒ AuditLog
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
#list ⇒ Object (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 |