Module: Representable::XML::AttributeHash

Includes:
HashMethods, Representable::XML
Defined in:
lib/representable/xml/hash.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HashMethods

#update_properties_from

Methods included from Representable::XML

Node, #from_node, #from_xml, #to_node, #to_xml

Class Method Details

.included(base) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/representable/xml/hash.rb', line 9

def self.included(base)
  base.class_eval do
    include Representable
    extend ClassMethods
    property(:_self, hash: true, use_attributes: true)
  end
end

Instance Method Details

#create_representation_with(doc, options, format) ⇒ Object



24
25
26
27
# File 'lib/representable/xml/hash.rb', line 24

def create_representation_with(doc, options, format)
  bin = representable_bindings_for(format, options).first
  bin.write(doc, super, options)
end