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, Validator Classes: Glob, Greedy, Single

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#default_valueObject

Returns the value of attribute default_value.



30
31
32
# File 'lib/usher/route/variable.rb', line 30

def default_value
  @default_value
end

#look_aheadObject

Returns the value of attribute look_ahead.



30
31
32
# File 'lib/usher/route/variable.rb', line 30

def look_ahead
  @look_ahead
end

#look_ahead_priorityObject

Returns the value of attribute look_ahead_priority.



30
31
32
# File 'lib/usher/route/variable.rb', line 30

def look_ahead_priority
  @look_ahead_priority
end

#nameObject (readonly)

Returns the value of attribute name.



29
30
31
# File 'lib/usher/route/variable.rb', line 29

def name
  @name
end

#regex_matcherObject (readonly)

Returns the value of attribute regex_matcher.



29
30
31
# File 'lib/usher/route/variable.rb', line 29

def regex_matcher
  @regex_matcher
end

#typeObject (readonly)

Returns the value of attribute type.



29
30
31
# File 'lib/usher/route/variable.rb', line 29

def type
  @type
end

#validatorObject (readonly)

Returns the value of attribute validator.



29
30
31
# File 'lib/usher/route/variable.rb', line 29

def validator
  @validator
end

Instance Method Details

#==(o) ⇒ Object



55
56
57
# File 'lib/usher/route/variable.rb', line 55

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

#valid!(val) ⇒ Object



48
49
# File 'lib/usher/route/variable.rb', line 48

def valid!(val)
end

#validates?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/usher/route/variable.rb', line 51

def validates?
  false
end