Module: Top4R::ClassUtilMixin::InstanceMethods

Defined in:
lib/top4r/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rawObject

Returns the value of attribute raw.



10
11
12
# File 'lib/top4r/core.rb', line 10

def raw
  @raw
end

Instance Method Details

#initialize(params = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/top4r/core.rb', line 12

def initialize(params = {})
  others = {}
  params.each do |key,val|
    if self.respond_to? key
      self.send("#{key}=", val)
    else
      others[key] = val
    end
  end
  self.send("raw=",params)
  self.send("#{:other_attrs}=", others) if self.respond_to? :other_attrs and others.size > 0
  self.send(:init) if self.respond_to? :init
end