Class: AssOle::Snippets::Shared::ValueTable::Wrapper Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ass_ole/snippets/shared/value_table.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Warapper for add rows into ValueTable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ole) ⇒ Wrapper

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Wrapper.



34
35
36
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 34

def initialize(ole)
  @ole = ole
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Pass other into #ole



53
54
55
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 53

def method_missing(method, *args)
  ole.send(method, *args)
end

Instance Attribute Details

#oleWIN32OLE (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns ValueTable object.

Returns:

  • (WIN32OLE)

    ValueTable object



33
34
35
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 33

def ole
  @ole
end

Instance Method Details

#add(**options) {|WIN32OLE| ... } ⇒ WIN32OLE

Add ValueTableRow into ValueTable

Parameters:

  • options (Hash)

    ValueTableRow values

Yields:

  • (WIN32OLE)

    added ValueTableRow object

Returns:

  • (WIN32OLE)

    1C ValueTableRow object



43
44
45
46
47
48
49
50
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 43

def add(**options, &block)
  r = ole.Add
  options.each do |k, v|
    r.send("#{k}=", v) unless v.nil?
  end
  yield r if block_given?
  r
end