Class: Nemo::MetaObject::RelationshipAttribute
- Defined in:
- lib/nemo/metaobject/attributes.rb
Direct Known Subclasses
BooleanAttribute, MultipleRelationshipAttribute, SingleRelationshipAttribute
Instance Attribute Summary
Attributes inherited from Attribute
#cache, #metaobject, #symbol, #validation_rules
Instance Method Summary collapse
Methods inherited from Attribute
#accept, #add_required_rule, #add_validation_rule, #commit_cache, #error_class, #format, #formatted_value, #initialize, #refresh_cache, #required, #required?, #rule_class, #validate_cache, #value
Methods included from Util::Accessors
#bool_accessor, #call_accessor, #proc_accessor
Constructor Details
This class inherits a constructor from Nemo::MetaObject::Attribute
Instance Method Details
#formatted_items ⇒ Object
208 209 210 211 |
# File 'lib/nemo/metaobject/attributes.rb', line 208 def formatted_items return @relationship_to.call.collect { |i| format(i) } if @relationship_to Array.new end |
#items ⇒ Object
203 204 205 206 |
# File 'lib/nemo/metaobject/attributes.rb', line 203 def items return @relationship_to.call if @relationship_to Array.new end |