Class: OdataDuty::EntityType::Metadata

Inherits:
ComplexType::Metadata show all
Defined in:
lib/odata_duty/entity_type.rb

Instance Attribute Summary collapse

Attributes inherited from ComplexType::Metadata

#complex_type

Instance Method Summary collapse

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_typeObject (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_typeObject



30
31
32
# File 'lib/odata_duty/entity_type.rb', line 30

def 
  :entity
end

#nameObject



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_refsObject



34
35
36
# File 'lib/odata_duty/entity_type.rb', line 34

def property_refs
  entity_type.property_refs
end