Class: OmniHooks::Strategy::Namespace
- Inherits:
-
Struct
- Object
- Struct
- OmniHooks::Strategy::Namespace
- Defined in:
- lib/omnihooks/strategy.rb
Instance Attribute Summary collapse
-
#delimiter ⇒ Object
Returns the value of attribute delimiter.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
Instance Attribute Details
#delimiter ⇒ Object
Returns the value of attribute delimiter
150 151 152 |
# File 'lib/omnihooks/strategy.rb', line 150 def delimiter @delimiter end |
#prefix ⇒ Object
Returns the value of attribute prefix
150 151 152 |
# File 'lib/omnihooks/strategy.rb', line 150 def prefix @prefix end |
Instance Method Details
#call(name = nil) ⇒ Object
151 152 153 |
# File 'lib/omnihooks/strategy.rb', line 151 def call(name = nil) "#{prefix}#{delimiter}#{name}" end |
#to_regexp(name = nil) ⇒ Object
155 156 157 |
# File 'lib/omnihooks/strategy.rb', line 155 def to_regexp(name = nil) %r{^#{Regexp.escape(call(name))}} end |