Class: RecurlyEvent::Namespace
- Inherits:
-
Struct
- Object
- Struct
- RecurlyEvent::Namespace
- Defined in:
- lib/recurly_event/namespace.rb
Constant Summary collapse
- RESOURCES_REGEXP =
/account|billing_info|invoice|subscription|payment|refund/
Instance Attribute Summary collapse
-
#delimeter ⇒ Object
Returns the value of attribute delimeter.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Instance Method Summary collapse
Instance Attribute Details
#delimeter ⇒ Object
Returns the value of attribute delimeter
2 3 4 |
# File 'lib/recurly_event/namespace.rb', line 2 def delimeter @delimeter end |
#namespace ⇒ Object
Returns the value of attribute namespace
2 3 4 |
# File 'lib/recurly_event/namespace.rb', line 2 def namespace @namespace end |
Instance Method Details
#parse_with_namespace(name) ⇒ Object
9 10 11 |
# File 'lib/recurly_event/namespace.rb', line 9 def parse_with_namespace(name) with_namespace(parse_name(name)) end |
#regexp_wrap(name) ⇒ Object
13 14 15 |
# File 'lib/recurly_event/namespace.rb', line 13 def regexp_wrap(name) /^#{Regexp.escape(with_namespace(name))}/ end |
#with_namespace(name) ⇒ Object
5 6 7 |
# File 'lib/recurly_event/namespace.rb', line 5 def with_namespace(name) "#{namespace}#{delimeter}#{name}" end |