Class: XamplGenerator::Options

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

Constant Summary collapse

@@tag =
"options"
@@ns =
"http://xampl.com/generator"
@@ns_tag =
"{http://xampl.com/generator}options"
@@module_name =
"XamplGenerator"
@@attributes =
[
]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ResolveAsChild

#add_resolve, #init_resolve_as_child, #new_resolve, #remove_resolve, #resolve_child, #resolve_child=

Methods included from IndexAttributeAsChild

#add_index_attribute, #ensure_index_attribute, #index_attribute_child, #index_attribute_child=, #init_index_attribute_as_child, #new_index_attribute, #remove_index_attribute

Constructor Details

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

Returns a new instance of Options.

Yields:

  • (_self)

Yield Parameters:



1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1194

def initialize
  super

  init_xampl_object
  init_data_content
  init_index_attribute_as_child
  init_resolve_as_child

  yield(self) if block_given?
  changed
end

Class Method Details

.module_nameObject



1225
1226
1227
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1225

def Options.module_name
  @@module_name
end

.nsObject



1217
1218
1219
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1217

def Options.ns
  @@ns
end

.ns_tagObject



1221
1222
1223
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1221

def Options.ns_tag
  @@ns_tag
end

.persisted?Boolean

Returns:

  • (Boolean)


1177
1178
1179
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1177

def Options.persisted?
  false
end

.tagObject



1213
1214
1215
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1213

def Options.tag
  @@tag
end

Instance Method Details

#after_visit(visitor) ⇒ Object



1261
1262
1263
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1261

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

#append_to(other) ⇒ Object



1209
1210
1211
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1209

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

#attributesObject



1245
1246
1247
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1245

def attributes
  @@attributes
end

#before_visit(visitor) ⇒ Object



1253
1254
1255
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1253

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

#clear_non_persistent_index_attributesObject



1206
1207
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1206

def clear_non_persistent_index_attributes
end

#module_nameObject



1241
1242
1243
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1241

def module_name
  @@module_name
end

#nsObject



1233
1234
1235
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1233

def ns
  @@ns
end

#ns_tagObject



1237
1238
1239
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1237

def ns_tag
  @@ns_tag
end

#persisted?Boolean

Returns:

  • (Boolean)


1181
1182
1183
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1181

def persisted?
  false
end

#resolve(namespace, pkg = "XamplAdHoc", preferred_prefix = nil) ⇒ Object



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/xamplr-gen/xampl-generator.rb', line 424

def resolve(namespace, pkg="XamplAdHoc", preferred_prefix=nil)
  if (namespace.kind_of?(Array)) then
    namespace.each do |ns, prefix|
      self.new_resolve do |resolver|
        resolver.pkg = pkg
        resolver.namespace = ns
        resolver.preferred_prefix = prefix
      end
    end
  else
    self.new_resolve do |resolver|
      resolver.pkg = pkg
      resolver.namespace = namespace
      resolver.preferred_prefix = preferred_prefix
    end
  end
end

#substitute_in_visit(visitor) ⇒ Object



1249
1250
1251
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1249

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

#tagObject



1229
1230
1231
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1229

def tag
  @@tag
end

#visit(visitor) ⇒ Object



1257
1258
1259
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 1257

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