Class: U3dCore::Globals
- Inherits:
-
Object
- Object
- U3dCore::Globals
- Defined in:
- lib/u3d_core/globals.rb
Overview
all these attributes are false by default and can be set overriden temporarily using a
with_attr(value) do
something
end
construct
Class Attribute Summary collapse
-
.do_not_login ⇒ Object
writeonly
Sets the attribute do_not_login.
-
.log_timestamps ⇒ Object
writeonly
Sets the attribute log_timestamps.
-
.use_keychain ⇒ Object
writeonly
Sets the attribute use_keychain.
-
.verbose ⇒ Object
writeonly
Sets the attribute verbose.
Class Method Summary collapse
- .method_missing(method_sym, *arguments, &block) ⇒ Object
- .respond_to_missing?(method_sym, include_private = false) ⇒ Boolean
Class Attribute Details
.do_not_login=(value) ⇒ Object (writeonly)
Sets the attribute do_not_login
35 36 37 |
# File 'lib/u3d_core/globals.rb', line 35 def do_not_login=(value) @do_not_login = value end |
.log_timestamps=(value) ⇒ Object (writeonly)
Sets the attribute log_timestamps
35 36 37 |
# File 'lib/u3d_core/globals.rb', line 35 def (value) = value end |
.use_keychain=(value) ⇒ Object (writeonly)
Sets the attribute use_keychain
35 36 37 |
# File 'lib/u3d_core/globals.rb', line 35 def use_keychain=(value) @use_keychain = value end |
.verbose=(value) ⇒ Object (writeonly)
Sets the attribute verbose
35 36 37 |
# File 'lib/u3d_core/globals.rb', line 35 def verbose=(value) @verbose = value end |
Class Method Details
.method_missing(method_sym, *arguments, &block) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/u3d_core/globals.rb', line 56 def method_missing(method_sym, *arguments, &block) case method_sym.to_s when /^with_(.*)$/ if attributes.include? Regexp.last_match(1) with(Regexp.last_match(1).to_sym, arguments.first, &block) else super end when /^(.*)\?$/ if attributes.include? Regexp.last_match(1) is?(Regexp.last_match(1).to_sym) else super end else super end end |
.respond_to_missing?(method_sym, include_private = false) ⇒ Boolean
75 76 77 78 79 80 81 82 |
# File 'lib/u3d_core/globals.rb', line 75 def respond_to_missing?(method_sym, include_private = false) case method_sym.to_s when /^with_(.*)$/ || /^(.*)\?$/ return attributes.include? Regexp.last_match(1) else super end end |