Class: OData::EntitySet

Inherits:
Object
  • Object
show all
Defined in:
lib/odata/entity_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ EntitySet


6
7
8
9
10
# File 'lib/odata/entity_set.rb', line 6

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

Instance Attribute Details

#member_typeObject (readonly)

Returns the value of attribute member_type


4
5
6
# File 'lib/odata/entity_set.rb', line 4

def member_type
  @member_type
end

#nameObject (readonly)

Returns the value of attribute name


3
4
5
# File 'lib/odata/entity_set.rb', line 3

def name
  @name
end

Instance Method Details

#collection?Boolean


12
13
14
# File 'lib/odata/entity_set.rb', line 12

def collection?
  true
end

#typeObject


16
17
18
# File 'lib/odata/entity_set.rb', line 16

def type
  @service.get_type_by_name("Collection(#{member_type})")
end