Sha256: 5993e07826579d15802fb8952a7e3ac6502ac525e0ad24e5be6ac3ee9e0093c2
Contents?: true
Size: 653 Bytes
Versions: 37
Compression:
Stored size: 653 Bytes
Contents
module ApiClient module Mixins module Instantiation def self.extended(base) base.instance_eval do attr_accessor :original_scope end end def build_one(hash) instance = self.new self.namespace ? hash[namespace] : hash instance.original_scope = self.scope.clone_only_headers instance end def build_many(array) array.collect { |one| build_one(one) } end def build(result_or_array) if result_or_array.is_a?(Array) build_many result_or_array else build_one result_or_array end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems