Class: Userbin::Context

Inherits:
Model
  • Object
show all
Defined in:
lib/userbin/models/context.rb

Instance Method Summary collapse

Methods inherited from Model

#attributes, #initialize, instance_custom, #to_json

Constructor Details

This class inherits a constructor from Userbin::Model

Instance Method Details

#locationObject



9
10
11
12
13
# File 'lib/userbin/models/context.rb', line 9

def location
  if attributes['location']
    Userbin::Location.new(attributes['location'])
  end
end

#user_agentObject



3
4
5
6
7
# File 'lib/userbin/models/context.rb', line 3

def user_agent
  if attributes['user_agent']
    Userbin::UserAgent.new(attributes['user_agent'])
  end
end