Class: Symbol
- Defined in
- lib/kyanite/fsymbol.rb,
lib/kyanite/symbol.rb,
lib/kyanite/general/classutils.rb
Class Utils
- Kyanite tests and examples
- Usage
-
require 'kyanite/general/classutils'
Core Extensions (collapse)
-
- (Array) *(n)
like String method with same name.
-
- (Symbol) +(other)
like String method with same name.
-
- (self) dup
self, you can not dup Symbols.
Class Utils (collapse)
Instance Method Summary (collapse)
Instance Method Details
- (Array) *(n)
like String method with same name
30 31 32 33 34 35 36 |
# File 'lib/kyanite/symbol.rb', line 30 def *(n) result = [] n.times do result << self end # do return result end |
- (Symbol) +(other)
like String method with same name
24 25 26 |
# File 'lib/kyanite/symbol.rb', line 24 def +(other) (self.to_s + other.to_s).to_sym end |
- (self) dup
self, you can not dup Symbols
20 |
# File 'lib/kyanite/symbol.rb', line 20 def dup; self; end |
- (Object) to_class
194 195 196 |
# File 'lib/kyanite/general/classutils.rb', line 194 def to_class self.to_s.to_class end |
- (Object) to_classname
189 190 191 |
# File 'lib/kyanite/general/classutils.rb', line 189 def to_classname self.to_s.to_classname end |
- (Object) to_fsymbol(def_tree = nil)
120 121 122 |
# File 'lib/kyanite/fsymbol.rb', line 120 def to_fsymbol(def_tree=nil) FSymbol.new(self, def_tree) end |