Class: OData::Operation

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_odata/operation.rb

Overview

Internally used helper class for storing operations called against the service. This class shouldn't be used directly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, klass_name, klass, child_klass = nil) ⇒ Operation

Creates a new instance of the Operation class

Parameters:

  • kind (String)

    the operation type (Standard: Add, Update, or Delete | Links: AddLink)

  • klass_name (String)

    the name/type of the class to operate against

  • klass (Object)

    the actual class

  • child_klass (Object, nil) (defaults to: nil)

    used for link operations only



12
13
14
15
16
17
# File 'lib/ruby_odata/operation.rb', line 12

def initialize(kind, klass_name, klass, child_klass = nil)
  @kind = kind
  @klass_name = klass_name
  @klass = klass
  @child_klass = child_klass
end

Instance Attribute Details

#child_klassObject

Returns the value of attribute child_klass



4
5
6
# File 'lib/ruby_odata/operation.rb', line 4

def child_klass
  @child_klass
end

#kindObject

Returns the value of attribute kind



4
5
6
# File 'lib/ruby_odata/operation.rb', line 4

def kind
  @kind
end

#klassObject

Returns the value of attribute klass



4
5
6
# File 'lib/ruby_odata/operation.rb', line 4

def klass
  @klass
end

#klass_nameObject

Returns the value of attribute klass_name



4
5
6
# File 'lib/ruby_odata/operation.rb', line 4

def klass_name
  @klass_name
end