Class: TidyFFI::OptionsContainer::Proxy
- Inherits:
-
Object
- Object
- TidyFFI::OptionsContainer::Proxy
- Defined in:
- lib/tidy_ffi/options_container.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #clean(str, opts = {}) ⇒ Object
- #clear! ⇒ Object
-
#initialize(obj, options1, options2) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(meth, *args) ⇒ Object
- #with_options(options) ⇒ Object
Constructor Details
#initialize(obj, options1, options2) ⇒ Proxy
Returns a new instance of Proxy.
71 72 73 74 75 |
# File 'lib/tidy_ffi/options_container.rb', line 71 def initialize(obj, , ) @obj = obj @options = TidyFFI::OptionsContainer.new() @options.() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
86 87 88 |
# File 'lib/tidy_ffi/options_container.rb', line 86 def method_missing(meth, *args) @obj.send(meth, *args) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
61 62 63 |
# File 'lib/tidy_ffi/options_container.rb', line 61 def @options end |
Instance Method Details
#clean(str, opts = {}) ⇒ Object
67 68 69 |
# File 'lib/tidy_ffi/options_container.rb', line 67 def clean(str, opts = {}) @obj.clean(str, .to_hash!.merge(opts)) end |
#clear! ⇒ Object
81 82 83 84 |
# File 'lib/tidy_ffi/options_container.rb', line 81 def clear! @options.clear! self end |