Class: Redactor::DSL
- Inherits:
-
Object
- Object
- Redactor::DSL
- Defined in:
- lib/redactor/dsl.rb
Instance Attribute Summary collapse
-
#redactor ⇒ Object
readonly
Returns the value of attribute redactor.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(redactor) ⇒ DSL
constructor
A new instance of DSL.
- #rule(reason, regex = nil, &block) ⇒ Object
Constructor Details
#initialize(redactor) ⇒ DSL
Returns a new instance of DSL.
5 6 7 |
# File 'lib/redactor/dsl.rb', line 5 def initialize(redactor) @redactor = redactor end |
Instance Attribute Details
#redactor ⇒ Object (readonly)
Returns the value of attribute redactor.
3 4 5 |
# File 'lib/redactor/dsl.rb', line 3 def redactor @redactor end |
Class Method Details
.run(redactor, block) ⇒ Object
14 15 16 |
# File 'lib/redactor/dsl.rb', line 14 def self.run(redactor, block) new(redactor).instance_eval(&block) end |