Class: XamplGenerator::IndexAttribute

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

Constant Summary collapse

@@tag =
"index-attribute"
@@ns =
"http://xampl.com/generator"
@@ns_tag =
"{http://xampl.com/generator}index-attribute"
@@module_name =
"XamplGenerator"
@@attributes =
[
        [ :@name, "name" ],
                [ :@persisted, "persisted" ],
]

Instance Attribute Summary

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(index = nil) {|_self| ... } ⇒ IndexAttribute

Returns a new instance of IndexAttribute.

Yields:

  • (_self)

Yield Parameters:



1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
# File 'lib/xamplr/xampl-hand-generated.rb', line 1312

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

  @name = nil if not defined? @name
  @persisted = nil if not defined? @persisted

  init_xampl_object

  yield(self) if block_given?
  changed
end

Class Method Details

.module_nameObject



1346
1347
1348
# File 'lib/xamplr/xampl-hand-generated.rb', line 1346

def IndexAttribute.module_name
  @@module_name
end

.nsObject



1338
1339
1340
# File 'lib/xamplr/xampl-hand-generated.rb', line 1338

def IndexAttribute.ns
  @@ns
end

.ns_tagObject



1342
1343
1344
# File 'lib/xamplr/xampl-hand-generated.rb', line 1342

def IndexAttribute.ns_tag
  @@ns_tag
end

.persisted?Boolean

Returns:

  • (Boolean)


1273
1274
1275
# File 'lib/xamplr/xampl-hand-generated.rb', line 1273

def IndexAttribute.persisted?
  false
end

.tagObject



1334
1335
1336
# File 'lib/xamplr/xampl-hand-generated.rb', line 1334

def IndexAttribute.tag
  @@tag
end

Instance Method Details

#after_visit(visitor) ⇒ Object



1394
1395
1396
# File 'lib/xamplr/xampl-hand-generated.rb', line 1394

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

#append_to(other) ⇒ Object



1330
1331
1332
# File 'lib/xamplr/xampl-hand-generated.rb', line 1330

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

#attributesObject



1366
1367
1368
# File 'lib/xamplr/xampl-hand-generated.rb', line 1366

def attributes
  @@attributes
end

#before_visit(visitor) ⇒ Object



1386
1387
1388
# File 'lib/xamplr/xampl-hand-generated.rb', line 1386

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

#clear_non_persistent_index_attributesObject



1325
1326
1327
1328
# File 'lib/xamplr/xampl-hand-generated.rb', line 1325

def clear_non_persistent_index_attributes
  @name = nil
  @persisted = nil
end

#get_the_indexObject



1374
1375
1376
# File 'lib/xamplr/xampl-hand-generated.rb', line 1374

def get_the_index
  @name
end

#indexed_byObject



1370
1371
1372
# File 'lib/xamplr/xampl-hand-generated.rb', line 1370

def indexed_by
  :name
end

#module_nameObject



1362
1363
1364
# File 'lib/xamplr/xampl-hand-generated.rb', line 1362

def module_name
  @@module_name
end

#nameObject



1290
1291
1292
1293
# File 'lib/xamplr/xampl-hand-generated.rb', line 1290

def name
  accessed
  @name
end

#name=(v) ⇒ Object



1295
1296
1297
1298
1299
# File 'lib/xamplr/xampl-hand-generated.rb', line 1295

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

#nsObject



1354
1355
1356
# File 'lib/xamplr/xampl-hand-generated.rb', line 1354

def ns
  @@ns
end

#ns_tagObject



1358
1359
1360
# File 'lib/xamplr/xampl-hand-generated.rb', line 1358

def ns_tag
  @@ns_tag
end

#persistedObject



1301
1302
1303
1304
# File 'lib/xamplr/xampl-hand-generated.rb', line 1301

def persisted
  accessed
  @persisted
end

#persisted=(v) ⇒ Object



1306
1307
1308
1309
1310
# File 'lib/xamplr/xampl-hand-generated.rb', line 1306

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

#persisted?Boolean

Returns:

  • (Boolean)


1277
1278
1279
# File 'lib/xamplr/xampl-hand-generated.rb', line 1277

def persisted?
  false
end

#set_the_index(index) ⇒ Object



1378
1379
1380
# File 'lib/xamplr/xampl-hand-generated.rb', line 1378

def set_the_index(index)
  @name = index
end

#substitute_in_visit(visitor) ⇒ Object



1382
1383
1384
# File 'lib/xamplr/xampl-hand-generated.rb', line 1382

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

#tagObject



1350
1351
1352
# File 'lib/xamplr/xampl-hand-generated.rb', line 1350

def tag
  @@tag
end

#visit(visitor) ⇒ Object



1390
1391
1392
# File 'lib/xamplr/xampl-hand-generated.rb', line 1390

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