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
-
.included(mod) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#to_h ⇒ Hash
Generates a Hash from the data_keys.
Methods included from RequestExtension
Methods included from SafeExtension
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_h ⇒ Hash
Generates a Hash from the data_keys
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 |