Class: Dragonfly::UrlMapper::Segment

Inherits:
Struct
  • Object
show all
Defined in:
lib/dragonfly/url_mapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#paramObject

Returns the value of attribute param

Returns:

  • (Object)

    the current value of param



10
11
12
# File 'lib/dragonfly/url_mapper.rb', line 10

def param
  @param
end

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



10
11
12
# File 'lib/dragonfly/url_mapper.rb', line 10

def pattern
  @pattern
end

#seperatorObject

Returns the value of attribute seperator

Returns:

  • (Object)

    the current value of seperator



10
11
12
# File 'lib/dragonfly/url_mapper.rb', line 10

def seperator
  @seperator
end

Instance Method Details

#regexp_stringObject



11
12
13
# File 'lib/dragonfly/url_mapper.rb', line 11

def regexp_string
  @regexp_string ||= "(#{Regexp.escape(seperator)}#{pattern}+?)?"
end