Module: ObjectPaths::ModelSupport::ClassMethods

Defined in:
lib/object_paths/model_support.rb

Overview

ClassMethods module provides class-level methods for ObjectPaths.

Instance Method Summary collapse

Instance Method Details

#object_path(path_definition) ⇒ ObjectPaths::ObjectPath

Adds a convenience method to the class level for creating ObjectPaths.

Parameters:

  • path_definition (String, Array)

    The path definition to convert into an ObjectPath.

Returns:



35
36
37
# File 'lib/object_paths/model_support.rb', line 35

def object_path(path_definition)
  ObjectPaths::ObjectPath.new(path_definition)
end