Class: JustimmoClient::V1::RealtyUsage

Inherits:
JustimmoBase show all
Defined in:
lib/justimmo_client/api/v1/models/realty_usage.rb

Attributes collapse

Instance Method Summary collapse

Methods included from Utils

#api, #autoload_dir, #interface, #model, #representer, #request, #translate, #versioned_api

Methods included from Logging

default_logger, #logger, rails_logger

Instance Method Details

#businessBoolean

Returns:

  • (Boolean)


21
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 21

attribute :business,   Boolean

#business?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 10


#investmentBoolean

Returns:

  • (Boolean)


22
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 22

attribute :investment, Boolean

#investment?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 14


#livingBoolean

Returns:

  • (Boolean)


20
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 20

attribute :living,     Boolean

#living?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 6


#map(&block) ⇒ Object



34
35
36
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 34

def map(&block)
  to_a.map(&block)
end

#to_aObject



26
27
28
29
30
31
32
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 26

def to_a
  tmp = []
  tmp << :living if living?
  tmp << :business if business?
  tmp << :investment if investment?
  tmp
end

#to_sObject



42
43
44
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 42

def to_s
  translated.join(", ")
end

#translatedObject



38
39
40
# File 'lib/justimmo_client/api/v1/models/realty_usage.rb', line 38

def translated
  map { |x| translate(x) }
end