Module: Djoini::Composable

Included in:
Base, Base::ClassMethods, Record, Relation
Defined in:
lib/djoini/composite.rb

Overview

Handles array for dynamic attributes and the module to include

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *array, &block) ⇒ Object



12
13
14
# File 'lib/djoini/composite.rb', line 12

def method_missing(method, *array, &block)
  features.dispatch(method, *array, &block)
end

Instance Method Details

#featuresObject



4
5
6
# File 'lib/djoini/composite.rb', line 4

def features
  @__features__ ||= Composite.new
end

#respond_to_missing?(method, *_array) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/djoini/composite.rb', line 8

def respond_to_missing?(method, *_array)
  features.reveives?(method)
end