Class: OdataDuty::EnumType::Metadata
- Inherits:
-
Object
- Object
- OdataDuty::EnumType::Metadata
- Defined in:
- lib/odata_duty/enum_type.rb
Instance Attribute Summary collapse
-
#enum_type ⇒ Object
readonly
Returns the value of attribute enum_type.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(enum_type) ⇒ Metadata
constructor
A new instance of Metadata.
- #members ⇒ Object
- #metadata_type ⇒ Object
- #name ⇒ Object
- #property_type ⇒ Object
- #scalar? ⇒ Boolean
Constructor Details
#initialize(enum_type) ⇒ Metadata
Returns a new instance of Metadata.
28 29 30 |
# File 'lib/odata_duty/enum_type.rb', line 28 def initialize(enum_type) @enum_type = enum_type end |
Instance Attribute Details
#enum_type ⇒ Object (readonly)
Returns the value of attribute enum_type.
26 27 28 |
# File 'lib/odata_duty/enum_type.rb', line 26 def enum_type @enum_type end |
Instance Method Details
#description ⇒ Object
36 37 38 |
# File 'lib/odata_duty/enum_type.rb', line 36 def description enum_type.description end |
#members ⇒ Object
32 33 34 |
# File 'lib/odata_duty/enum_type.rb', line 32 def members enum_type.members end |
#metadata_type ⇒ Object
48 49 50 |
# File 'lib/odata_duty/enum_type.rb', line 48 def :enum end |
#name ⇒ Object
44 45 46 |
# File 'lib/odata_duty/enum_type.rb', line 44 def name enum_type.to_s.split('::').last.sub(/EnumType\z/, '').sub(/Enum\z/, '') end |
#property_type ⇒ Object
52 53 54 |
# File 'lib/odata_duty/enum_type.rb', line 52 def property_type name end |
#scalar? ⇒ Boolean
40 41 42 |
# File 'lib/odata_duty/enum_type.rb', line 40 def scalar? true end |