Module: Firebrew::Entity

Included in:
Firefox::BasicExtension, Firefox::Profile
Defined in:
lib/firebrew/entity.rb

Defined Under Namespace

Modules: ClassMethod

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
# File 'lib/firebrew/entity.rb', line 3

def self.included(base)
  base.class_eval do
    extend ClassMethod
  end
end

Instance Method Details

#==(rop) ⇒ Object Also known as: eql?



36
37
38
39
40
41
# File 'lib/firebrew/entity.rb', line 36

def ==(rop)
  self.class.attributes.each do |attr|
    return false unless self.send(attr) == rop.send(attr)
  end
  return true
end

#initialize(attributes = {}) ⇒ Object



30
31
32
33
34
# File 'lib/firebrew/entity.rb', line 30

def initialize(attributes={})
  attributes.each do |(k,v)|
    self.send("#{k}=", v)
  end
end