Sha256: 89863d1edc0c663e69d27f49eb5fe5d6fa03ea268fb3975d6eadca25ecad69b2
Contents?: true
Size: 885 Bytes
Versions: 20
Compression:
Stored size: 885 Bytes
Contents
require 'rubygems' require 'hpricot' module Gattica # Represents an account that an authenticated user has access to class Account include Convertible attr_reader :id, :updated, :title, :table_id, :account_id, :account_name, :profile_id, :web_property_id def initialize(xml) @id = xml.at(:id).inner_html @updated = DateTime.parse(xml.at(:updated).inner_html) @title = xml.at(:title).inner_html @table_id = xml.at('dxp:tableid').inner_html @account_id = xml.at("dxp:property[@name='ga:accountId']").attributes['value'].to_i @account_name = xml.at("dxp:property[@name='ga:accountName']").attributes['value'] @profile_id = xml.at("dxp:property[@name='ga:profileId']").attributes['value'].to_i @web_property_id = xml.at("dxp:property[@name='ga:webPropertyId']").attributes['value'] end end end
Version data entries
20 entries across 20 versions & 5 rubygems