Module: VersionCake::ControllerAdditions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/versioncake/controller_additions.rb
Instance Attribute Summary collapse
-
#versioned_request ⇒ Object
writeonly
Sets the attribute versioned_request.
Instance Method Summary collapse
-
#derived_version ⇒ Object
The requested version by a client or if it’s nil the latest or default version configured.
-
#is_latest_version ⇒ Object
A boolean check to determine if the latest version is requested.
-
#requested_version ⇒ Object
The explicit version requested by a client, this may not be the rendered version and may also be nil.
Instance Attribute Details
#versioned_request=(value) ⇒ Object
Sets the attribute versioned_request
7 8 9 |
# File 'lib/versioncake/controller_additions.rb', line 7 def versioned_request=(value) @versioned_request = value end |
Instance Method Details
#derived_version ⇒ Object
The requested version by a client or if it’s nil the latest or default version configured.
23 24 25 |
# File 'lib/versioncake/controller_additions.rb', line 23 def derived_version versioned_request.version end |
#is_latest_version ⇒ Object
A boolean check to determine if the latest version is requested.
28 29 30 |
# File 'lib/versioncake/controller_additions.rb', line 28 def is_latest_version versioned_request.is_latest_version? end |
#requested_version ⇒ Object
The explicit version requested by a client, this may not be the rendered version and may also be nil.
17 18 19 |
# File 'lib/versioncake/controller_additions.rb', line 17 def requested_version versioned_request.extracted_version end |