Class: XamplGenerator::ChildElement

Inherits:
Object
  • Object
show all
Includes:
Xampl::XamplObject, Xampl::XamplWithoutContent
Defined in:
lib/xamplr-gen/xampl-generator.rb,
lib/xamplr-gen/xampl-hand-generated.rb

Constant Summary collapse

@@tag =
"childElement"
@@ns =
"http://xampl.com/generator"
@@ns_tag =
"{http://xampl.com/generator}childElement"
@@module_name =
"XamplGenerator"
@@attributes =
[
        [ :@element_name, "element_name" ],
                [ :@name, "name" ],
                [ :@namespace, "namespace" ],
                [ :@index_class, "index_class" ],
                [ :@index, "index" ],
                [ :@package, "package" ],
]

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index = nil) {|_self| ... } ⇒ ChildElement

Returns a new instance of ChildElement.

Yields:

  • (_self)

Yield Parameters:



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 944

def initialize(index=nil)
  @name = index if index
  super()

  @element_name = nil if not defined? @element_name
  @name = nil if not defined? @name
  @namespace = nil if not defined? @namespace
  @index_class = nil if not defined? @index_class
  @index = nil if not defined? @index
  @package = nil if not defined? @package

  init_xampl_object

  yield(self) if block_given?
  changed
end

Class Method Details

.module_nameObject



986
987
988
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 986

def ChildElement.module_name
  @@module_name
end

.nsObject



978
979
980
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 978

def ChildElement.ns
  @@ns
end

.ns_tagObject



982
983
984
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 982

def ChildElement.ns_tag
  @@ns_tag
end

.persisted?Boolean

Returns:

  • (Boolean)


857
858
859
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 857

def ChildElement.persisted?
  false
end

.tagObject



974
975
976
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 974

def ChildElement.tag
  @@tag
end

Instance Method Details

#after_visit(visitor) ⇒ Object



1034
1035
1036
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1034

def after_visit(visitor)
  visitor.after_visit_child_element(self)
end

#append_to(other) ⇒ Object



970
971
972
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 970

def append_to(other)
  other.add_child_element(self)
end

#attributesObject



1006
1007
1008
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1006

def attributes
  @@attributes
end

#before_visit(visitor) ⇒ Object



1026
1027
1028
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1026

def before_visit(visitor)
  visitor.before_visit_child_element(self)
end

#clear_non_persistent_index_attributesObject



961
962
963
964
965
966
967
968
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 961

def clear_non_persistent_index_attributes
  @element_name = nil
  @name = nil
  @namespace = nil
  @index_class = nil
  @index = nil
  @package = nil
end

#element_nameObject



878
879
880
881
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 878

def element_name
  accessed
  @element_name
end

#element_name=(v) ⇒ Object



883
884
885
886
887
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 883

def element_name=(v)
  accessed
  changed
  @element_name = v
end

#find_element(map) ⇒ Object



444
445
446
447
# File 'lib/xamplr-gen/xampl-generator.rb', line 444

def find_element(map)
  elements = map[self.namespace]
  return elements.element[self.element_name]
end

#get_the_indexObject



1014
1015
1016
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1014

def get_the_index
  @name
end

#indexObject



922
923
924
925
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 922

def index
  accessed
  @index
end

#index=(v) ⇒ Object



927
928
929
930
931
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 927

def index=(v)
  accessed
  changed
  @index = v
end

#index_classObject



911
912
913
914
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 911

def index_class
  accessed
  @index_class
end

#index_class=(v) ⇒ Object



916
917
918
919
920
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 916

def index_class=(v)
  accessed
  changed
  @index_class = v
end

#indexed_byObject



1010
1011
1012
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1010

def indexed_by
  :name
end

#module_nameObject



1002
1003
1004
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1002

def module_name
  @@module_name
end

#nameObject



889
890
891
892
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 889

def name
  accessed
  @name
end

#name=(v) ⇒ Object



894
895
896
897
898
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 894

def name=(v)
  accessed
  changed
  @name = v
end

#namespaceObject



900
901
902
903
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 900

def namespace
  accessed
  @namespace
end

#namespace=(v) ⇒ Object



905
906
907
908
909
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 905

def namespace=(v)
  accessed
  changed
  @namespace = v
end

#nsObject



994
995
996
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 994

def ns
  @@ns
end

#ns_tagObject



998
999
1000
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 998

def ns_tag
  @@ns_tag
end

#packageObject



933
934
935
936
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 933

def package
  accessed
  @package
end

#package=(v) ⇒ Object



938
939
940
941
942
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 938

def package=(v)
  accessed
  changed
  @package = v
end

#persisted?Boolean

Returns:

  • (Boolean)


861
862
863
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 861

def persisted?
  false
end

#set_the_index(index) ⇒ Object



1018
1019
1020
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1018

def set_the_index(index)
  @name = index
end

#substitute_in_visit(visitor) ⇒ Object



1022
1023
1024
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1022

def substitute_in_visit(visitor)
  return visitor.substitute_in_visit_child_element(self) || self
end

#tagObject



990
991
992
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 990

def tag
  @@tag
end

#visit(visitor) ⇒ Object



1030
1031
1032
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1030

def visit(visitor)
  visitor.visit_child_element(self)
end