@api semipublic
# File lib/dm-core/query/path.rb, line 80 def initialize(relationships, property_name = nil) @relationships = relationships.to_ary.dup last_relationship = @relationships.last @repository_name = last_relationship.relative_target_repository_name @model = last_relationship.target_model if property_name property_name = property_name.to_sym @property = @model.properties(@repository_name)[property_name] || raise(ArgumentError, "Unknown property '#{property_name}' in #{@model}") end end
Used for creating :order options. This technique may be deprecated, so marking as semipublic until the issue is resolved.
@api semipublic
# File lib/dm-core/query/path.rb, line 57 def asc Operator.new(property, :asc) end
Used for creating :order options. This technique may be deprecated, so marking as semipublic until the issue is resolved.
@api semipublic
# File lib/dm-core/query/path.rb, line 65 def desc Operator.new(property, :desc) end
@api public
# File lib/dm-core/query/path.rb, line 49 def instance_of?(klass) super || (defined?(@property) ? @property.instance_of?(klass) : false) end
@api public
# File lib/dm-core/query/path.rb, line 44 def kind_of?(klass) super || (defined?(@property) ? @property.kind_of?(klass) : false) end
@api semipublic
# File lib/dm-core/query/path.rb, line 70 def respond_to?(method, include_private = false) super || (defined?(@property) && @property.respond_to?(method, include_private)) || @model.relationships(@repository_name).named?(method) || @model.properties(@repository_name).named?(method) end
Generated with the Darkfish Rdoc Generator 2.