Module: Dawn::BaseApi

Includes:
RequestExtension
Included in:
Account, App, App::Domains, App::Drains, App::Env, App::Gears, App::Releases, Domain, Drain, Gear, Key, Release, User
Defined in:
lib/dawn/api/base_api.rb,
lib/dawn/api/safe/base_api.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassExtension, RequestExtension

Class Method Summary collapse

Instance Method Summary collapse

Methods included from RequestExtension

#request

Methods included from SafeExtension

#safe

Class Method Details

.included(mod) ⇒ Object

:nodoc:



74
75
76
# File 'lib/dawn/api/base_api.rb', line 74

def self.included(mod)
  mod.extend ClassExtension
end

Instance Method Details

#to_hHash

Generates a Hash from the data_keys

Returns:

  • (Hash)


84
85
86
87
88
# File 'lib/dawn/api/base_api.rb', line 84

def to_h
  self.class.data_keys.each_with_object({}) do |key, hash|
    hash[key] = send(key) if respond_to?(key)
  end
end