Class: Zena::Acts::Serializable::XmlNodeSerializer

Inherits:
ActiveRecord::XmlSerializer
  • Object
show all
Defined in:
lib/zena/acts/serializable.rb

Overview

IdAttribute

Instance Method Summary collapse

Instance Method Details

#add_attributesObject



58
59
60
61
62
63
64
65
66
# File 'lib/zena/acts/serializable.rb', line 58

def add_attributes
  ( serializable_attributes          +
    serializable_method_attributes   +
    serializable_property_attributes +
    serializable_id_attributes
  ).each do |attribute|
    add_tag(attribute)
  end
end

#serializable_id_attributesObject



72
73
74
# File 'lib/zena/acts/serializable.rb', line 72

def serializable_id_attributes
  Array(options[:ids]).map { |name, value| IdAttribute.new(name, @record, value) }
end

#serializable_property_attributesObject



68
69
70
# File 'lib/zena/acts/serializable.rb', line 68

def serializable_property_attributes
  Array(options[:properties]).map { |name, value| PropertyAttribute.new(name, @record, value) }
end