Sha256: ab31503dd389d77d68cd6d85a6de9f7ca02e902e993705d52e182e879eb6ad49
Contents?: true
Size: 425 Bytes
Versions: 10
Compression:
Stored size: 425 Bytes
Contents
class BazaModels::Model::Reflection def initialize(relationship) @relationship = relationship end def class_name @relationship.fetch(:class_name) end def collection? @relationship.fetch(:type) == :has_many end def foreign_key @relationship.fetch(:foreign_key).to_s end def klass StringCases.constantize(class_name) end def name @relationship.fetch(:relation_name) end end
Version data entries
10 entries across 10 versions & 1 rubygems