Parent

Files

RightAws::ActiveSdb::ColumnSet

Attributes

columns[RW]

Public Class Methods

new() click to toggle source
# File lib/sdb/active_sdb.rb, line 1040
def initialize
  @columns = {}
end

Public Instance Methods

all() click to toggle source
# File lib/sdb/active_sdb.rb, line 1044
def all
  @columns.keys
end
column(col_name) click to toggle source
# File lib/sdb/active_sdb.rb, line 1048
def column(col_name)
  @columns[col_name.to_s]
end
Also aliased as: include?
default(col_name) click to toggle source
# File lib/sdb/active_sdb.rb, line 1057
def default(col_name)
  return nil unless include?(col_name)
  default = column(col_name)[:default]
  default.respond_to?(:call) ? default.call : default
end
include?(col_name) click to toggle source
Alias for: column
method_missing(method_sym, *args) click to toggle source
# File lib/sdb/active_sdb.rb, line 1063
def method_missing(method_sym, *args)
  data_type = args.shift || :String
  options = args.shift || {}
  @columns[method_sym.to_s] = options.merge( :type => data_type )
end
type_of(col_name) click to toggle source
# File lib/sdb/active_sdb.rb, line 1053
def type_of(col_name)
  column(col_name) && column(col_name)[:type]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.