Class: Bulk::Collection::Error

Inherits:
Struct
  • Object
show all
Defined in:
lib/bulk/collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



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

def data
  @data
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



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

def type
  @type
end

Instance Method Details

#to_hashObject



7
8
9
10
11
# File 'lib/bulk/collection.rb', line 7

def to_hash
  h = {:type => type}
  h[:data] = data if data
  h
end