Class: UrlMount::Segment::Conditional

Inherits:
Base
  • Object
show all
Defined in:
lib/url_mount.rb

Defined Under Namespace

Classes: UnrequiredUrlMount

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#required_variable_segments

Constructor Details

#initialize(*args) ⇒ Conditional

Returns a new instance of Conditional.



186
187
188
# File 'lib/url_mount.rb', line 186

def initialize(*args)
  @url_mount = UnrequiredUrlMount.new(*args)
end

Instance Method Details

#optional_variable_segmentsObject



190
191
192
# File 'lib/url_mount.rb', line 190

def optional_variable_segments
  (@url_mount.required_variable_segments + @url_mount.optional_variable_segments)
end

#optional_variablesObject



195
196
197
# File 'lib/url_mount.rb', line 195

def optional_variables
  (@url_mount.required_variables + @url_mount.optional_variables)
end

#required_variablesObject



194
# File 'lib/url_mount.rb', line 194

def required_variables; []; end

#to_s(opts = {}) ⇒ Object



199
200
201
# File 'lib/url_mount.rb', line 199

def to_s(opts = {})
  @url_mount.to_s(opts)
end