Class: RecurlyEvent::Namespace

Inherits:
Struct
  • Object
show all
Defined in:
lib/recurly_event/namespace.rb

Constant Summary collapse

RESOURCES_REGEXP =
/account|billing_info|invoice|subscription|payment|refund/

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delimeterObject

Returns the value of attribute delimeter

Returns:

  • (Object)

    the current value of delimeter



2
3
4
# File 'lib/recurly_event/namespace.rb', line 2

def delimeter
  @delimeter
end

#namespaceObject

Returns the value of attribute namespace

Returns:

  • (Object)

    the current value of 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