Class: Restspec::Values::StatusCode
- Inherits:
-
Struct
- Object
- Struct
- Restspec::Values::StatusCode
- Defined in:
- lib/restspec/values/status_code.rb
Instance Attribute Summary collapse
-
#number_or_symbol ⇒ Object
Returns the value of attribute number_or_symbol.
Instance Method Summary collapse
Instance Attribute Details
#number_or_symbol ⇒ Object
Returns the value of attribute number_or_symbol
3 4 5 |
# File 'lib/restspec/values/status_code.rb', line 3 def number_or_symbol @number_or_symbol end |
Instance Method Details
#value ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/restspec/values/status_code.rb', line 4 def value if number_or_symbol.is_a?(Symbol) Rack::Utils::SYMBOL_TO_STATUS_CODE.fetch(number_or_symbol) else number_or_symbol end end |