Module: ZTK::DSL::Core::ClassMethods Private
- Defined in:
- lib/ztk/dsl/core.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary (collapse)
- - (Object) cattr_accessor(*args) private
- - (Object) cattr_reader(*args) private
- - (Object) cattr_writer(*args) private
Instance Method Details
- (Object) cattr_accessor(*args)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 52 |
# File 'lib/ztk/dsl/core.rb', line 49 def cattr_accessor(*args) cattr_reader(*args) cattr_writer(*args) end |
- (Object) cattr_reader(*args)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/ztk/dsl/core.rb', line 54 def cattr_reader(*args) args.flatten.each do |arg| next if arg.is_a?(Hash) instance_eval %Q{ unless defined?(@@#{arg}) @@#{arg} = nil end def #{arg} @@#{arg} end } end end |
- (Object) cattr_writer(*args)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/ztk/dsl/core.rb', line 69 def cattr_writer(*args) args.flatten.each do |arg| next if arg.is_a?(Hash) instance_eval %Q{ unless defined?(@@#{arg}) @@#{arg} = nil end def #{arg}=(value) @@#{arg} = value end } end end |