Class: Findex::DSL
- Inherits:
-
Object
- Object
- Findex::DSL
- Defined in:
- lib/findex/dsl.rb
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
Instance Method Summary collapse
- #config(&block) ⇒ Object
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
- #on(extension, &block) ⇒ Object
Constructor Details
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
5 6 7 |
# File 'lib/findex/dsl.rb', line 5 def definitions @definitions end |
Instance Method Details
#config(&block) ⇒ Object
16 17 18 19 |
# File 'lib/findex/dsl.rb', line 16 def config(&block) return @config unless block_given? @config = Config.new(&block) end |
#on(extension, &block) ⇒ Object
12 13 14 |
# File 'lib/findex/dsl.rb', line 12 def on(extension, &block) @definitions[extension] = block end |