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.



45
46
47
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 45

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



64
65
66
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 64

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



44
45
46
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 44

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



54
55
56
57
58
59
60
61
# File 'lib/ass_ole/snippets/shared/value_table.rb', line 54

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