Sha256: 66cd24e358720d17bdff9230703e51c523a5e9076c7e8288ce719e3c252ca497
Contents?: true
Size: 597 Bytes
Versions: 3
Compression:
Stored size: 597 Bytes
Contents
module Hobo class Metadata class << self attr_accessor :metadata, :store, :defaults def store @store ||= {} end def metadata @metadata ||= {} end def default type, value @defaults ||= {} @defaults[type] = value store[type] = value if store[type].nil? end def add task, type, data = nil data = store[type] if data.nil? metadata[task] ||= {} metadata[task][type] = data store[type] = @defaults[type] ? @defaults[type].dup : @defaults[type] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hobo-inviqa-0.0.4 | lib/hobo/metadata.rb |
hobo-inviqa-0.0.3 | lib/hobo/metadata.rb |
hobo-inviqa-0.0.2 | lib/hobo/metadata.rb |