Sha256: 4dbaa171fd72d2f5c4585dcba01547789ace0fe787c0b51bf2c671ca73a1a4ce

Contents?: true

Size: 462 Bytes

Versions: 13

Compression:

Stored size: 462 Bytes

Contents

module Yao::Resources
  class User < Base
    friendly_attributes :name, :email, :enabled, :id

    alias enabled? enabled

    self.service        = "identity"
    self.resource_name  = "user"
    self.resources_name = "users"
    self.admin          = true

    class << self
      def return_single_on_querying
        api_verion_v2?
      end

      private
      def api_verion_v2?
        client.url_prefix.to_s.match?(/v2\.0/)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
yao-0.13.4 lib/yao/resources/user.rb
yao-0.13.3 lib/yao/resources/user.rb
yao-0.13.2 lib/yao/resources/user.rb
yao-0.13.1 lib/yao/resources/user.rb
yao-0.13.0 lib/yao/resources/user.rb
yao-0.12.0 lib/yao/resources/user.rb
yao-0.11.3 lib/yao/resources/user.rb
yao-0.11.2 lib/yao/resources/user.rb
yao-0.11.1 lib/yao/resources/user.rb
yao-0.11.0 lib/yao/resources/user.rb
yao-0.10.1 lib/yao/resources/user.rb
yao-0.10.0 lib/yao/resources/user.rb
yao-0.9.1 lib/yao/resources/user.rb