Module: Salestation::Web::Responses::Response
Instance Method Summary collapse
Instance Method Details
#with_code(code) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/salestation/web/responses.rb', line 17 def with_code(code) Class.new(self) do define_singleton_method :new do |attrs| super(attrs.merge(status: code)) end end end |