Class: Module
Instance Method Summary collapse
-
#attach_dsl(*mods) ⇒ Object
(also: #attach_dsls)
Attach module as DSL.
-
#dsl ⇒ Object
Return a map of registered DSLs.
-
#store_dsl_options(name, opts) ⇒ Object
Store some data associated with a DSL name.
Instance Method Details
#attach_dsl(*mods) ⇒ Object Also known as: attach_dsls
Attach module as DSL. Module may use store_dsl_options method to store DSL.
7 8 9 10 11 12 |
# File 'lib/strokedb/util/attach_dsl.rb', line 7 def attach_dsl(*mods) @dsl_options ||= {} mods.each do |mod| extend(mod) end end |
#dsl ⇒ Object
Return a map of registered DSLs.
23 24 25 |
# File 'lib/strokedb/util/attach_dsl.rb', line 23 def dsl @dsl_options end |
#store_dsl_options(name, opts) ⇒ Object
Store some data associated with a DSL name.
17 18 19 |
# File 'lib/strokedb/util/attach_dsl.rb', line 17 def (name, opts) @dsl_options[name] = opts end |