Module: XamplGenerator::OptionsAsChild

Defined in:
lib/xamplr-gen/xampl-hand-generated.rb

Instance Method Summary collapse

Instance Method Details

#add_options(options) ⇒ Object



319
320
321
322
323
324
325
326
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 319

def add_options(options)
  accessed
  @children << options
  @options_child << options
  options.add_parent(self)
  changed
  return options
end

#init_options_as_childObject



315
316
317
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 315

def init_options_as_child
  @options_child = []
end

#new_options {|options| ... } ⇒ Object Also known as: ensure_options

Yields:



328
329
330
331
332
333
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 328

def new_options
  accessed
  options = Options.new
  yield(options) if block_given?
  return add_options(options)
end

#options_childObject Also known as: options



302
303
304
305
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 302

def options_child
  accessed
  @options_child
end

#options_child=(v) ⇒ Object Also known as: options=



307
308
309
310
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 307

def options_child=(v)
  accessed
  @options_child = v
end

#remove_options(options) ⇒ Object



337
338
339
340
341
# File 'lib/xamplr-gen/xampl-hand-generated.rb', line 337

def remove_options(options)
  accessed
  @options_child.delete(options)
  @children.delete(options)
end