Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/clj/types.rb

Instance Method Summary collapse

Instance Method Details

#keyword!Object


121
122
123
# File 'lib/clj/types.rb', line 121

def keyword!
	self
end

#keyword?Boolean

Returns:

  • (Boolean)

129
# File 'lib/clj/types.rb', line 129

def keyword?; true;  end

#symbol!Object


125
126
127
# File 'lib/clj/types.rb', line 125

def symbol!
	Clojure::Symbol.new(self)
end

#symbol?Boolean

Returns:

  • (Boolean)

130
# File 'lib/clj/types.rb', line 130

def symbol?;  false; end

#to_cljObject


132
133
134
135
136
137
138
139
140
# File 'lib/clj/types.rb', line 132

def to_clj (*)
	result = to_sym.inspect

	unless result =~ /:([^(\[{'^@`~\"\\,\s;)\]}]+)/
		raise ArgumentError, "#{result} cannot be transformed into clojure"
	end

	result
end