class House
Object to represent a client creating objects against a server
Attributes
handler[RW]
Handles API calls
id[RW]
Attributes mapping to fields in the backend
Public Class Methods
new(params = {})
click to toggle source
Create a new house @param [Hash] params Parameters to create new house with
name, rooms, bathrooms, garages
# File lib/house_test.rb, line 33 def initialize(params = {}) self.handler = HouseHandler exchange = handler.post(body: params) self.id = exchange.response.body end