Module: MatrixSdk::Response::Extensions

Defined in:
lib/matrix_sdk/response.rb

Overview

Since:

  • 0.0.3

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object

Since:

  • 0.0.3



54
55
56
57
58
# File 'lib/matrix_sdk/response.rb', line 54

def method_missing(name, *args)
  return fetch(name) if key?(name) && args.empty?

  super
end

Instance Attribute Details

#apiObject (readonly)

Since:

  • 0.0.3



46
47
48
# File 'lib/matrix_sdk/response.rb', line 46

def api
  @api
end

Instance Method Details

#respond_to_missing?(name, *_args) ⇒ Boolean

Returns:

  • (Boolean)

Since:

  • 0.0.3



48
49
50
51
52
# File 'lib/matrix_sdk/response.rb', line 48

def respond_to_missing?(name, *_args)
  return true if key? name

  super
end