Method: Winker::Devices::DeviceMethods#find_type_and_id
- Defined in:
- lib/winker/devices/device_methods.rb
#find_type_and_id ⇒ Object
20 21 22 23 24 |
# File 'lib/winker/devices/device_methods.rb', line 20 def find_type_and_id @type = VALID_TYPES.find{|t| @obj_data.singleton_methods.map(&:to_s).include?("#{t}_id")} @id = @obj_data.send("#{@type}_id") @updated_at = 2.weeks.ago end |