Module: MyVR::API::Properties

Included in:
Client
Defined in:
lib/myvr/api/properties.rb

Instance Method Summary collapse

Instance Method Details

#properties(search = '') ⇒ Object



11
12
13
# File 'lib/myvr/api/properties.rb', line 11

def properties(search='')
  @properties ||= properties!(search)
end

#properties!(search = '') ⇒ Object



4
5
6
7
8
9
# File 'lib/myvr/api/properties.rb', line 4

def properties!(search = '')
  data = get_objects("/v1/properties/", { name: search })
  data.map do |property|
    MyVR::Property.new(property)
  end
end

#property(id) ⇒ Object



15
16
17
18
# File 'lib/myvr/api/properties.rb', line 15

def property(id)
  data = get_object("/v1/properties/#{ id }/")
  MyVR::Property.new(data)
end