spaceship/lib/spaceship/base.rb in fastlane-2.28.0.beta.20170420010017 vs spaceship/lib/spaceship/base.rb in fastlane-2.28.0

- old
+ new

@@ -18,10 +18,12 @@ # end # # When you want to instantiate a model pass in the parsed response: `Widget.new(widget_json)` class Base class DataHash + include Enumerable + def initialize(hash) @hash = hash || {} end def key?(key) @@ -48,13 +50,21 @@ else DataHash.new(@hash[head]).lookup(tail) end end + def each(&block) + @hash.each(&block) + end + def to_json(*a) h = @hash.dup h.delete(:application) h.to_json(*a) + end + + def to_h + @hash.dup end end class << self attr_accessor :client