CKElementID

Class/Module:
Class
In:
lib/cgikit.rb
Parent:
Object

Description

CKElementID is a class for element IDs. The object is used to specify an element when substituting form values and running an action.

Element ID has 3 elements, these are "component, repetitions, element". "repetitions" are definition names enclosed the element with CKRepetition and indexes in the CKRepetition elements.

The each elements are splitted by ’.’. Definition names and indexes in repetitions are splitted by ’:’.

 MainPage
 MainPage.String
 MainPage.Repetition:3.String

Component is required. If you specify elements in CKRepetition, repetitions are required.

Methods

component=
component?
each
new
repetitions?
to_s

Attributes

component [R]
Name of the component.
element [RW]
Name of the element.
repetitions [RW]
Array of the repetitions.

Public Class Methods

new( string = nil )

Public Instance Methods

component=( name )
component?( name )

Returns true if a component of the ID and specified are equal.

each() {|name, index| ...}

Executes the block for every definition names and repetition indexes.

repetitions?()

Returns true if the ID is in repetitions.

to_s()

Returns the object as a string.