Class: OData::CollectionType

Inherits:
Type
  • Object
show all
Defined in:
lib/odata/types/collection_type.rb

Instance Attribute Summary collapse

Attributes inherited from Type

#name

Instance Method Summary collapse

Methods inherited from Type

#coerce

Constructor Details

#initialize(options = {}) ⇒ CollectionType


5
6
7
8
# File 'lib/odata/types/collection_type.rb', line 5

def initialize(options = {})
  super
  @member_type = options[:member_type]
end

Instance Attribute Details

#member_typeObject (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

#propertiesObject


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