Class: Clojure::Namespace
- Inherits:
-
Hash
- Object
- Hash
- Clojure::Namespace
- Defined in:
- lib/clojure/namespace.rb
Constant Summary collapse
- SPECIAL =
calls with postponed evaluation of expression
%w[ns fn defn def quote let for].freeze
Instance Attribute Summary collapse
-
#runtime ⇒ Object
readonly
rubocop:enable Lint/MissingSuper.
Instance Method Summary collapse
- #evaluate(form) ⇒ Object
-
#initialize(runtime) ⇒ Namespace
constructor
rubocop:disable Lint/MissingSuper.
Constructor Details
#initialize(runtime) ⇒ Namespace
rubocop:disable Lint/MissingSuper
8 9 10 |
# File 'lib/clojure/namespace.rb', line 8 def initialize(runtime) @runtime = runtime end |
Instance Attribute Details
#runtime ⇒ Object (readonly)
rubocop:enable Lint/MissingSuper
13 14 15 |
# File 'lib/clojure/namespace.rb', line 13 def runtime @runtime end |
Instance Method Details
#evaluate(form) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/clojure/namespace.rb', line 18 def evaluate(form) case form when Array form_eval form when String resolve form else form end end |