Class: GhostRb::Resources::BaseResource
- Inherits:
-
Object
- Object
- GhostRb::Resources::BaseResource
- Includes:
- Support::Hydratable
- Defined in:
- lib/ghost_rb/resources/base_resource.rb
Overview
Class Method Summary collapse
Methods included from Support::Hydratable
Class Method Details
.generate(hash) ⇒ Object
12 13 14 15 16 |
# File 'lib/ghost_rb/resources/base_resource.rb', line 12 def self.generate(hash) res_instance = new res_instance.hydrate(hash) res_instance end |
.hash_value?(data, key) ⇒ Boolean
18 19 20 |
# File 'lib/ghost_rb/resources/base_resource.rb', line 18 def self.hash_value?(data, key) data.key?(key) && data[key].is_a?(Hash) end |