Class: Exchanger::Category

Inherits:
Element
  • Object
show all
Defined in:
lib/exchanger/elements/category.rb

Overview

The Category element represents on category from the CategoryList

msdn.microsoft.com/en-us/library/ee203806(v=exchg.80).aspx

Instance Attribute Summary

Attributes inherited from Element

#tag_name

Instance Method Summary collapse

Methods inherited from Element

#==, #assign_attributes_from_xml, create_element_accessors, element, #errors, #initialize, #inspect, key, new_from_xml, #to_xml, #to_xml_change, #to_xml_updates

Methods included from Persistence

#destroy, #new_record?, #persisted?, #reload, #save

Methods included from Dirty

#attribute_change, #attribute_changed?, #attribute_was, #changed, #changed?, #changes, included, #move_changes, #previous_changes, #reset_attribute!, #reset_modifications, #setup_modifications

Methods included from Attributes

#attributes, #attributes=, #change_key, #id, #identifier, #method_missing, #read_attribute, #respond_to?, #write_attribute

Constructor Details

This class inherits a constructor from Exchanger::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Exchanger::Attributes

Instance Method Details

#category_colorObject



23
24
25
# File 'lib/exchanger/elements/category.rb', line 23

def category_color
  @category_color ||= CategoryColor.new(color)
end

#colorObject



19
20
21
# File 'lib/exchanger/elements/category.rb', line 19

def color
  read_attribute(:color).to_i
end