Sha256: 185d5b289176b7a7ac9c6ec1aa646250fa707bd478d6b27470488067465f5071
Contents?: true
Size: 573 Bytes
Versions: 11
Compression:
Stored size: 573 Bytes
Contents
module Remarkable # :nodoc: module Private # :nodoc: # Returns the model class constant, as determined by the test class name. def subject_class # TODO: fazer um mixin na classe de string para retornar o formato do variable_name variable_name = "@#{instance_variable_name}" if instance_variable_defined?(variable_name) instance_variable_get(variable_name) else self.class.described_type end end def instance_variable_name self.class.described_type.to_s.split(':').last.underscore end end end
Version data entries
11 entries across 11 versions & 1 rubygems