class FileStoreTest::OrderedHash
Public Class Methods
[](*args)
click to toggle source
# File test/github_api_test.rb, line 15 def self.[](*args) hash = new while args.any? key, value = args.shift, args.shift hash[key] = value end hash end
new(hash = {})
click to toggle source
Calls superclass method
# File test/github_api_test.rb, line 24 def initialize(hash = {}) @keys = hash.keys super(hash) end
Public Instance Methods
[]=(key, value)
click to toggle source
Calls superclass method
# File test/github_api_test.rb, line 29 def []=(key, value) @keys << key; super end
each() { |key, self| ... }
click to toggle source
# File test/github_api_test.rb, line 31 def each @keys.each { |key| yield(key, self[key]) } end