Class: Ldbws::ResponseTypes::Base

Inherits:
Object
  • Object
show all
Includes:
ParsingFunctions
Defined in:
lib/ldbws/response_types/base.rb

Overview

Base class which defines most of the functionality required by subclasses.

Instance Method Summary collapse

Methods included from ParsingFunctions

included

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(prop) ⇒ Object



15
16
17
# File 'lib/ldbws/response_types/base.rb', line 15

def method_missing(prop)
  @props.fetch(prop)
end

Instance Method Details

#to_hObject



19
20
21
22
23
24
25
26
# File 'lib/ldbws/response_types/base.rb', line 19

def to_h
  @props.to_h do |k, v|
    [
      k,
      Ldbws::Utils.deep_hashify_value(v),
    ]
  end
end