class Sequel::Mapper::Struct

Public Class Methods

new(args={}) click to toggle source
# File lib/sequel/mapper/struct.rb, line 4
def initialize(args={})
  args.each { |k,v| self[k] = v if members.include?(k.to_sym) }
end

Public Instance Methods

slice(*keys) click to toggle source
# File lib/sequel/mapper/struct.rb, line 8
def slice(*keys)
  keys.reduce({}) do |hash, key|
    hash[key] = self[key]
    hash
  end
end