Class: XamplExample::Stuff

Inherits:
Object
  • Object
show all
Includes:
Xampl::XamplObject, Xampl::XamplWithoutContent
Defined in:
lib/xamplr/handwritten/example.rb,
lib/xamplr/handwritten/hand-example.rb

Constant Summary collapse

@@tag =
"stuff"
@@ns =
"http://xampl.com/example"
@@ns_tag =
"{http://xampl.com/example}stuff"
@@module_name =
"XamplExample"
@@attributes =
[
        [:@kind, "kind"],
                [:@special, "special", "http://xampl.com/example/special"]
]

Instance Attribute Summary collapse

Attributes included from Xampl::XamplObject

#is_changed, #parents

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Xampl::XamplWithoutContent

#<<, #after_visit_by_element_kind, #before_visit_by_element_kind, #children, #has_mixed_content, #test_to_xml, #test_to_xml_internal, #visit_by_element_kind

Methods included from Xampl::XamplObject

#===, #accessed, #add_parent, #changed, #changes_accepted, #compare_xampl, #copy_xampl, from_ruby, from_string, from_xml_file, from_xml_string, #ignore_when_no_index, #init_attributes, #init_hook, #init_xampl_object, #invalid, #invalidate, lookup_preferred_ns_prefix, #mark_changed_deep, #note_add_child, #note_add_to_parent, #note_adding_text_content, #note_attributes_initialised, #note_closed, #note_created, #note_initialise_attributes_with, #note_invalidate, #note_replacing, ns_preferred_prefix, #persist, #persist_required, #pp_xml, realise_from_xml_string, recover_from_string, #to_ruby, #to_xml

Constructor Details

#initialize {|_self| ... } ⇒ Stuff

Returns a new instance of Stuff.

Yields:

  • (_self)

Yield Parameters:



661
662
663
664
665
666
667
668
669
670
671
# File 'lib/xamplr/handwritten/example.rb', line 661

def initialize
  super
  init_xampl_object

  @kind = nil if not defined? @kind
  @special = nil if not defined? @special


  yield(self) if block_given?
  changed
end

Instance Attribute Details

#kindObject

Returns the value of attribute kind.



630
631
632
# File 'lib/xamplr/handwritten/example.rb', line 630

def kind
  @kind
end

#specialObject

Returns the value of attribute special.



631
632
633
# File 'lib/xamplr/handwritten/example.rb', line 631

def special
  @special
end

Class Method Details

.module_nameObject



645
646
647
# File 'lib/xamplr/handwritten/example.rb', line 645

def Stuff.module_name
  @@module_name
end

.nsObject



637
638
639
# File 'lib/xamplr/handwritten/example.rb', line 637

def Stuff.ns
  @@ns
end

.ns_tagObject



641
642
643
# File 'lib/xamplr/handwritten/example.rb', line 641

def Stuff.ns_tag
  @@ns_tag
end

.tagObject



633
634
635
# File 'lib/xamplr/handwritten/example.rb', line 633

def Stuff.tag
  @@tag
end

Instance Method Details

#append_to(other) ⇒ Object



673
674
675
# File 'lib/xamplr/handwritten/example.rb', line 673

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

#attributesObject



693
694
695
# File 'lib/xamplr/handwritten/example.rb', line 693

def attributes
  @@attributes
end

#module_nameObject



689
690
691
# File 'lib/xamplr/handwritten/example.rb', line 689

def module_name
  @@module_name
end

#nsObject



681
682
683
# File 'lib/xamplr/handwritten/example.rb', line 681

def ns
  @@ns
end

#ns_tagObject



685
686
687
# File 'lib/xamplr/handwritten/example.rb', line 685

def ns_tag
  @@ns_tag
end

#tagObject



677
678
679
# File 'lib/xamplr/handwritten/example.rb', line 677

def tag
  @@tag
end