« blib/lib/UR/Object/Property/View/ReferenceDescription/Text.pm
↑ Summary
blib/lib/UR/Role/MethodModifier/Before.pm »
| 1 | package UR::Object::Value; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use UR; | ||
| 6 | our $VERSION = "0.46"; # UR $VERSION; | ||
| 7 | |||
| 8 | class UR::Object::Value { | ||
| 9 | is => 'UR::Value', | ||
| 10 | is_abstract => 1, | ||
| 11 | subclassify_by => 'entity_class_name', | ||
| 12 | type_has => [ | ||
| 13 | entity_class_name => { is => 'Text' }, | ||
| 14 | ], | ||
| 15 | has => [ | ||
| 16 | rule => { is => 'UR::BoolExpr', id_by => 'id' }, | ||
| 17 | entity_class_name => { via => 'rule', to => 'subject_class_name' }, | ||
| 18 | ], | ||
| 19 | doc => 'an unordered group of distinct UR::Objects' | ||
| 20 | }; | ||
| 21 | |||
| 22 | sub AUTOSUB { | ||
| 23 | my ($method,$class) = @_; | ||
| 24 | my $entity_class_name = $class; | ||
| 25 | $entity_class_name =~ s/::Value$//g; | ||
| 26 | return unless $entity_class_name; | ||
| 27 | my $code = $entity_class_name->can($method); | ||
| 28 | return $code if $code; | ||
| 29 | } | ||
| 30 | |||
| 31 | 1; | ||
| 32 |