Class: Usher::Route::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/usher/route/variable.rb

Direct Known Subclasses

Glob, Greedy, Single

Defined Under Namespace

Modules: CaseEqualsValidator, ProcValidator Classes: Glob, Greedy, Single

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#default_valueObject

Returns the value of attribute default_value.



5
6
7
# File 'lib/usher/route/variable.rb', line 5

def default_value
  @default_value
end

#look_aheadObject

Returns the value of attribute look_ahead.



5
6
7
# File 'lib/usher/route/variable.rb', line 5

def look_ahead
  @look_ahead
end

#look_ahead_priorityObject

Returns the value of attribute look_ahead_priority.



5
6
7
# File 'lib/usher/route/variable.rb', line 5

def look_ahead_priority
  @look_ahead_priority
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/usher/route/variable.rb', line 4

def name
  @name
end

#regex_matcherObject (readonly)

Returns the value of attribute regex_matcher.



4
5
6
# File 'lib/usher/route/variable.rb', line 4

def regex_matcher
  @regex_matcher
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/usher/route/variable.rb', line 4

def type
  @type
end

#validatorObject (readonly)

Returns the value of attribute validator.



4
5
6
# File 'lib/usher/route/variable.rb', line 4

def validator
  @validator
end

Instance Method Details

#==(o) ⇒ Object



42
43
44
# File 'lib/usher/route/variable.rb', line 42

def ==(o)
  o && (o.class == self.class && o.name == @name && o.validator == @validator)
end

#valid!(val) ⇒ Object



23
24
# File 'lib/usher/route/variable.rb', line 23

def valid!(val)
end