Class: UrlMount::Segment::Variable

### Home Classes Methods

### In Files

- lib/url_mount.rb

### Parent

UrlMount::Segment::Base

### Methods

- ::new
- #required_variable_segments
- #to_s

### Class/Module Index

Quicksearch

- UrlMount
- UrlMount::Segment
- UrlMount::Segment::Base
- UrlMount::Segment::Conditional
- UrlMount::Segment::Conditional::UnrequiredUrlMount
- UrlMount::Segment::Delimeter
- UrlMount::Segment::Static
- UrlMount::Segment::Variable
- UrlMount::Ungeneratable

No matching classes.

# UrlMount::Segment::Variable

### Public Class Methods

new(name, options) click to toggle source

    # File lib/url_mount.rb, line 166
    def initialize(name, options)
      @name, @options = name.to_sym, (options || {})
    end

### Public Instance Methods

required_variable_segments() click to toggle source

    # File lib/url_mount.rb, line 170
    def required_variable_segments
      [self]
    end

to_s(opts = {}) click to toggle source

    # File lib/url_mount.rb, line 174
    def to_s(opts = {})
      item = opts.delete(name) || @options[name]
      item.respond_to?(:call) ? item.call : item
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.