Class: ActiveApi::Collection

Inherits:
Object
  • Object
show all
Includes:
Builder, HasDefinition
Defined in:
lib/active_api/collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasDefinition

#definition

Methods included from Builder

#build_xml

Constructor Details

#initialize(objects, options) ⇒ Collection

Returns a new instance of Collection.



8
9
10
11
12
13
# File 'lib/active_api/collection.rb', line 8

def initialize(objects, options)
  @objects  = objects
  @node     = options[:node]
  @parents  = options[:parents]
  @schema   = options[:schema]
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



6
7
8
# File 'lib/active_api/collection.rb', line 6

def node
  @node
end

#objectsObject (readonly)

Returns the value of attribute objects.



6
7
8
# File 'lib/active_api/collection.rb', line 6

def objects
  @objects
end

#parentsObject (readonly)

Returns the value of attribute parents.



6
7
8
# File 'lib/active_api/collection.rb', line 6

def parents
  @parents
end

#schemaObject (readonly)

Returns the value of attribute schema.



6
7
8
# File 'lib/active_api/collection.rb', line 6

def schema
  @schema
end