Class: OData::CollectionType
- Defined in:
- lib/odata/types/collection_type.rb
Instance Attribute Summary collapse
-
#member_type ⇒ Object
readonly
Returns the value of attribute member_type.
Attributes inherited from Type
Instance Method Summary collapse
- #collection? ⇒ Boolean
- #enum_type? ⇒ Boolean
-
#initialize(options = {}) ⇒ CollectionType
constructor
A new instance of CollectionType.
- #primitive_type? ⇒ Boolean
- #properties ⇒ Object
- #valid_value?(value) ⇒ Boolean
Methods inherited from Type
Constructor Details
#initialize(options = {}) ⇒ CollectionType
Returns a new instance of CollectionType.
5 6 7 8 |
# File 'lib/odata/types/collection_type.rb', line 5 def initialize( = {}) super @member_type = [:member_type] end |
Instance Attribute Details
#member_type ⇒ Object (readonly)
Returns the value of attribute member_type.
3 4 5 |
# File 'lib/odata/types/collection_type.rb', line 3 def member_type @member_type end |
Instance Method Details
#collection? ⇒ Boolean
22 23 24 |
# File 'lib/odata/types/collection_type.rb', line 22 def collection? true end |
#enum_type? ⇒ Boolean
18 19 20 |
# File 'lib/odata/types/collection_type.rb', line 18 def enum_type? OData::EnumType === member_type end |
#primitive_type? ⇒ Boolean
14 15 16 |
# File 'lib/odata/types/collection_type.rb', line 14 def primitive_type? OData::PrimitiveType === member_type end |
#properties ⇒ Object
26 27 28 |
# File 'lib/odata/types/collection_type.rb', line 26 def properties member_type.properties end |
#valid_value?(value) ⇒ Boolean
10 11 12 |
# File 'lib/odata/types/collection_type.rb', line 10 def valid_value?(value) member_type.valid_value?(value) end |