Class: IFormat::Category

Inherits:
Base
  • Object
show all
Defined in:
lib/iformat/category.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, lazy_attr_reader

Constructor Details

This class inherits a constructor from IFormat::Base

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


18
19
20
# File 'lib/iformat/category.rb', line 18

def ==(other)
  super || (other.class == self.class && other.id == self.id)
end

#idObject



8
9
10
# File 'lib/iformat/category.rb', line 8

def id
  @id ||= @attrs[:catid].to_i
end

#updated_atObject



12
13
14
# File 'lib/iformat/category.rb', line 12

def updated_at
  @updated_at ||= @attrs[:mtime]
end