class Epages::Category
Constants
- KEYS
Public Class Methods
new(data)
click to toggle source
# File lib/epages/category.rb, line 12 def initialize(data) parse_attribute_as_array_of('images', data.delete(:images), Epages::Image) parse_attribute_as_array_of('links', data.delete(:links), Epages::Link) parse_attribute_as_array_of('sub_categories', data.delete(:subCategories), Epages::Link) @parent = Epages::Link.new(data.delete(:parent)) if data[:parent] parse_attributes(data) end
Public Instance Methods
==(other)
click to toggle source
# File lib/epages/category.rb, line 20 def ==(other) return false if other.class != Epages::Category category_id == other.category_id && name == other.name end