Class: Dcm4chee::ApiConstraints
- Inherits:
-
Object
- Object
- Dcm4chee::ApiConstraints
- Defined in:
- lib/dcm4chee/api_constraints.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ ApiConstraints
constructor
A new instance of ApiConstraints.
- #matches?(req) ⇒ Boolean
Constructor Details
#initialize(options) ⇒ ApiConstraints
Returns a new instance of ApiConstraints.
3 4 5 6 |
# File 'lib/dcm4chee/api_constraints.rb', line 3 def initialize() @version = [:version] @default = [:default] end |
Instance Method Details
#matches?(req) ⇒ Boolean
8 9 10 |
# File 'lib/dcm4chee/api_constraints.rb', line 8 def matches?(req) @default || req.headers['Accept'].include?("application/vnd.menglifang.org; version=#{@version}") end |