Class: Web::Node

Inherits:
Object show all
Defined in:
lib/web/template.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(canonical_name, value, parent, name) ⇒ Node

Returns a new instance of Node.



15
16
17
18
19
20
# File 'lib/web/template.rb', line 15

def initialize canonical_name, value, parent, name
  @canonical_name = canonical_name
  @value = value
  @parent = parent
  @name = name
end

Instance Attribute Details

#anAliasObject

Returns the value of attribute anAlias.



13
14
15
# File 'lib/web/template.rb', line 13

def anAlias
  @anAlias
end

#canonical_nameObject (readonly)

Returns the value of attribute canonical_name.



12
13
14
# File 'lib/web/template.rb', line 12

def canonical_name
  @canonical_name
end

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/web/template.rb', line 12

def name
  @name
end

#parentObject (readonly)

Returns the value of attribute parent.



12
13
14
# File 'lib/web/template.rb', line 12

def parent
  @parent
end

#scopeObject

Returns the value of attribute scope.



13
14
15
# File 'lib/web/template.rb', line 13

def scope
  @scope
end

#valueObject (readonly)

Returns the value of attribute value.



12
13
14
# File 'lib/web/template.rb', line 12

def value
  @value
end

Instance Method Details

#eachObject



22
23
24
25
26
# File 'lib/web/template.rb', line 22

def each 
  @value.each_with_index { |value,i|
	yield Scope.new(value,"#{@canonical_name}[#{i}]",@scope,@anAlias)
  }
end