Class: XamplExample::Things

Inherits:
Object
  • Object
show all
Includes:
Xampl::XamplPersistedObject, Xampl::XamplWithDataContent, ThingAsChild
Defined in:
lib/xamplr/handwritten/example.rb

Constant Summary collapse

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

Instance Attribute Summary

Attributes included from ThingAsChild

#thing_child, #thing_map

Attributes included from Xampl::XamplPersistedObject

#load_needed, #persister

Attributes included from Xampl::XamplObject

#is_changed, #parents

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThingAsChild

#add_thing, #init_thing_as_child, #new_thing, #remove_thing

Methods included from Xampl::XamplWithDataContent

#<<, #_content, #_content=, #add_content, #after_visit_by_element_kind, #before_visit_by_element_kind, #children, #has_mixed_content, #init_data_content, #test_to_xml, #test_to_xml_internal, #visit_by_element_kind

Methods included from Xampl::XamplPersistedObject

#accessed, #changed, #describe_yourself, #force_load, #init_xampl_object, #introduce_persister, #persist_required, #reset_contents

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| ... } ⇒ Things

Returns a new instance of Things.

Yields:

  • (_self)

Yield Parameters:



250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/xamplr/handwritten/example.rb', line 250

def initialize
  super
  init_xampl_object


  init_data_content

  init_thing_as_child

  yield(self) if block_given?
  changed
end

Class Method Details

.module_nameObject



243
244
245
# File 'lib/xamplr/handwritten/example.rb', line 243

def Things.module_name
  @@module_name
end

.nsObject



235
236
237
# File 'lib/xamplr/handwritten/example.rb', line 235

def Things.ns
  @@ns
end

.ns_tagObject



239
240
241
# File 'lib/xamplr/handwritten/example.rb', line 239

def Things.ns_tag
  @@ns_tag
end

.tagObject



231
232
233
# File 'lib/xamplr/handwritten/example.rb', line 231

def Things.tag
  @@tag
end

Instance Method Details

#append_to(other) ⇒ Object



263
264
265
# File 'lib/xamplr/handwritten/example.rb', line 263

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

#attributesObject



283
284
285
# File 'lib/xamplr/handwritten/example.rb', line 283

def attributes
  @@attributes
end

#module_nameObject



279
280
281
# File 'lib/xamplr/handwritten/example.rb', line 279

def module_name
  @@module_name
end

#nsObject



271
272
273
# File 'lib/xamplr/handwritten/example.rb', line 271

def ns
  @@ns
end

#ns_tagObject



275
276
277
# File 'lib/xamplr/handwritten/example.rb', line 275

def ns_tag
  @@ns_tag
end

#tagObject



267
268
269
# File 'lib/xamplr/handwritten/example.rb', line 267

def tag
  @@tag
end