Class: Euston::Websites::ApiVersion
- Inherits:
-
Object
- Object
- Euston::Websites::ApiVersion
- Defined in:
- lib/euston-websites/api_version.rb
Instance Method Summary collapse
-
#initialize(version) ⇒ ApiVersion
constructor
A new instance of ApiVersion.
- #matches?(request) ⇒ Boolean
Constructor Details
#initialize(version) ⇒ ApiVersion
Returns a new instance of ApiVersion.
7 8 9 |
# File 'lib/euston-websites/api_version.rb', line 7 def initialize version @version = version end |
Instance Method Details
#matches?(request) ⇒ Boolean
11 12 13 |
# File 'lib/euston-websites/api_version.rb', line 11 def matches? request versioned_accept_header?(request) || version_one?(request) end |