Method: Miasma::Types::Api#api_for

Defined in:
lib/miasma/types/api.rb

#api_for(type) ⇒ Api

Build new API for specified type using current provider / creds



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/miasma/types/api.rb', line 71

def api_for(type)
  memoize(type) do
    Miasma.api(
      Smash.new(
        :type => type,
        :provider => provider,
        :credentials => attributes,
      )
    )
  end
end