Class/Module Index [+]

Quicksearch

CIMI::Model::Schema::DSL

The DSL

Requires that the class into which this is included has a add_attributes! method

Public Instance Methods

array(name, opts={}, &block) click to toggle source
# File lib/cimi/model/schema.rb, line 257
def array(name, opts={}, &block)
  add_attributes!([name, opts], Array, &block)
end
hash(name, opts={}, &block) click to toggle source
# File lib/cimi/model/schema.rb, line 265
def hash(name, opts={}, &block)
  add_attributes!([name, opts], Hash, &block)
end
href(*args) click to toggle source
# File lib/cimi/model/schema.rb, line 244
def href(*args)
  args.each { |arg| struct(arg) { scalar :href } }
end
scalar(*args) click to toggle source
# File lib/cimi/model/schema.rb, line 253
def scalar(*args)
  add_attributes!(args, Scalar)
end
struct(name, opts={}, &block) click to toggle source
# File lib/cimi/model/schema.rb, line 261
def struct(name, opts={}, &block)
  add_attributes!([name, opts], Struct, &block)
end
text(*args) click to toggle source
# File lib/cimi/model/schema.rb, line 248
def text(*args)
  args.expand_opts!(:text => :nested)
  scalar(*args)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.