Class: XMLable::Handlers::Attribute
- Includes:
- Mixins::Described, Mixins::Namespace, Mixins::Tag
- Defined in:
- lib/xmlable/handlers/attribute.rb
Overview
Attribute handles XML attributes objects
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#from_xml_attribute(attribute) ⇒ XMLable::Mixins::Object
Create attribute object from the XML attribute.
- #inject_wraped(klass) ⇒ Object
- #proxy ⇒ Object
Methods inherited from Base
#block_settings?, build, #initialize, #method_name, #options, #options?, #type_class, #wrapped_type?
Constructor Details
This class inherits a constructor from XMLable::Handlers::Base
Instance Method Details
#from_xml_attribute(attribute) ⇒ XMLable::Mixins::Object
Create attribute object from the XML attribute
36 37 38 |
# File 'lib/xmlable/handlers/attribute.rb', line 36 def from_xml_attribute(attribute) Builder.build_attribute(attribute, self) end |
#inject_wraped(klass) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/xmlable/handlers/attribute.rb', line 14 def inject_wraped(klass) klass.class_eval do include XMLable::Mixins::ValueStorage include XMLable::Mixins::Instantiable end klass end |
#proxy ⇒ Object
25 26 27 |
# File 'lib/xmlable/handlers/attribute.rb', line 25 def proxy @proxy ||= type_class.tap { |a| a.class_eval(&@block) if block_settings? } end |