Class: NoSE::Serialize::EntityFieldRepresenter
- Inherits:
-
Representable::Decorator
- Object
- Representable::Decorator
- NoSE::Serialize::EntityFieldRepresenter
- Includes:
- Representable::Hash, Representable::JSON, Representable::Uncached, Representable::YAML
- Defined in:
- lib/nose/serialize.rb
Overview
Represents all data of a field
Instance Method Summary collapse
-
#entity ⇒ String
The entity name for foreign keys.
-
#relationship ⇒ Symbol
The cardinality of the relationship.
-
#reverse ⇒ String
The reverse.
Methods included from Representable::Uncached
Instance Method Details
#entity ⇒ String
The entity name for foreign keys
161 162 163 164 |
# File 'lib/nose/serialize.rb', line 161 def entity represented.entity.name \ if represented.is_a? Fields::ForeignKeyField end |
#relationship ⇒ Symbol
The cardinality of the relationship
169 170 171 172 |
# File 'lib/nose/serialize.rb', line 169 def relationship represented.relationship \ if represented.is_a? Fields::ForeignKeyField end |
#reverse ⇒ String
The reverse
177 178 179 180 |
# File 'lib/nose/serialize.rb', line 177 def reverse represented.reverse.name \ if represented.is_a? Fields::ForeignKeyField end |