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
-
#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.
22 23 24 |
# File 'lib/odata_duty/enum_type.rb', line 22 def initialize(enum_type) @enum_type = enum_type end |
Instance Attribute Details
#enum_type ⇒ Object (readonly)
Returns the value of attribute enum_type.
20 21 22 |
# File 'lib/odata_duty/enum_type.rb', line 20 def enum_type @enum_type end |
Instance Method Details
#members ⇒ Object
26 27 28 |
# File 'lib/odata_duty/enum_type.rb', line 26 def members enum_type.members end |
#metadata_type ⇒ Object
38 39 40 |
# File 'lib/odata_duty/enum_type.rb', line 38 def :enum end |
#name ⇒ Object
34 35 36 |
# File 'lib/odata_duty/enum_type.rb', line 34 def name enum_type.to_s.split('::').last.sub(/EnumType\z/, '').sub(/Enum\z/, '') end |
#property_type ⇒ Object
42 43 44 |
# File 'lib/odata_duty/enum_type.rb', line 42 def property_type name end |
#scalar? ⇒ Boolean
30 31 32 |
# File 'lib/odata_duty/enum_type.rb', line 30 def scalar? true end |