Module: XMLable::Mixins::OptionsStorage::ClassMethods

Defined in:
lib/xmlable/mixins/options_storage.rb

Instance Method Summary collapse

Instance Method Details

#__optionsXMLable::Options::Strage

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.

Get the options storage

Returns:

  • (XMLable::Options::Strage)


33
34
35
# File 'lib/xmlable/mixins/options_storage.rb', line 33

def __options
  @__options ||= __nested(:@__options) || Options::Storage.new
end

#before_export(&block) ⇒ Object

Set the before export options



22
23
24
# File 'lib/xmlable/mixins/options_storage.rb', line 22

def before_export(&block)
  __options.opt_set(:before_export, block) if block_given?
end

#on_export(*args) ⇒ Object

Set the export options



15
16
17
# File 'lib/xmlable/mixins/options_storage.rb', line 15

def on_export(*args)
  args.each { |opt| __options.opt_set(opt, true) }
end