Module: XMLable::Mixins::ContentStorage::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#__content_methodString, ...

Get content method

Returns:

  • (String, nil, false)


131
132
133
134
# File 'lib/xmlable/mixins/content_storage.rb', line 131

def __content_method
  return @__content_method if instance_variable_defined?(:@__content_method)
  @__content_method = __nested(:@__content_method)
end

#content(name) ⇒ Object

Define content method

If given +false+ name than content isn't available to this element.

Parameters:

  • name (String, Symbol, false)


122
123
124
# File 'lib/xmlable/mixins/content_storage.rb', line 122

def content(name)
  @__content_method = name.is_a?(String) ? name.to_sym : name
end