class Photozou::Base

Public Class Methods

new(attrs = {}) click to toggle source
# File lib/photozou/base.rb, line 3
def initialize(attrs = {})
  @attrs = attrs || {}
  @attrs.keys.each { |key|
    self.class.send(:define_method, key) {
      @attrs[key]
    }
  }
end

Public Instance Methods

override(attr_name, &block) click to toggle source
# File lib/photozou/base.rb, line 12
def override(attr_name, &block)
  @attrs[attr_name] = block.call(@attrs[attr_name])
end