Class: OdataDuty::EntityType::Metadata
- Inherits:
-
ComplexType::Metadata
- Object
- ComplexType::Metadata
- OdataDuty::EntityType::Metadata
- Defined in:
- lib/odata_duty/entity_type.rb
Instance Attribute Summary collapse
-
#entity_type ⇒ Object
readonly
Returns the value of attribute entity_type.
Attributes inherited from ComplexType::Metadata
Instance Method Summary collapse
-
#initialize(entity_type) ⇒ Metadata
constructor
A new instance of Metadata.
- #metadata_type ⇒ Object
- #name ⇒ Object
- #property_refs ⇒ Object
Methods inherited from ComplexType::Metadata
#metadata_types, #properties, #property_type, #scalar?
Constructor Details
#initialize(entity_type) ⇒ Metadata
Returns a new instance of Metadata.
21 22 23 24 |
# File 'lib/odata_duty/entity_type.rb', line 21 def initialize(entity_type) @entity_type = entity_type super end |
Instance Attribute Details
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type.
19 20 21 |
# File 'lib/odata_duty/entity_type.rb', line 19 def entity_type @entity_type end |
Instance Method Details
#metadata_type ⇒ Object
30 31 32 |
# File 'lib/odata_duty/entity_type.rb', line 30 def :entity end |
#name ⇒ Object
26 27 28 |
# File 'lib/odata_duty/entity_type.rb', line 26 def name entity_type.to_s.split('::').last.sub(/EntityType\z/, '').sub(/Entity\z/, '') end |
#property_refs ⇒ Object
34 35 36 |
# File 'lib/odata_duty/entity_type.rb', line 34 def property_refs entity_type.property_refs end |