Sha256: 6add8ebeab7248d6a6ee1f31a9d1a945d267fd84513a9fabf442c8870a946040

Contents?: true

Size: 443 Bytes

Versions: 35

Compression:

Stored size: 443 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
    self.return_single_on_querying = true

    class << self
      def get_by_name(name)
        self.list(name: name)
      end
      alias find_by_name get_by_name
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
yao-0.7.0 lib/yao/resources/user.rb
yao-0.6.3 lib/yao/resources/user.rb
yao-0.6.2 lib/yao/resources/user.rb
yao-0.6.1 lib/yao/resources/user.rb
yao-0.6.0 lib/yao/resources/user.rb
yao-0.5.0 lib/yao/resources/user.rb
yao-0.4.3 lib/yao/resources/user.rb
yao-0.4.2 lib/yao/resources/user.rb
yao-0.4.1 lib/yao/resources/user.rb
yao-0.4.0 lib/yao/resources/user.rb
yao-0.3.8 lib/yao/resources/user.rb
yao-0.3.7 lib/yao/resources/user.rb
yao-0.3.6 lib/yao/resources/user.rb
yao-0.3.5 lib/yao/resources/user.rb
yao-0.3.4 lib/yao/resources/user.rb
yao-0.3.3 lib/yao/resources/user.rb
yao-0.3.2 lib/yao/resources/user.rb
yao-0.3.1 lib/yao/resources/user.rb
yao-0.3.0 lib/yao/resources/user.rb
yao-0.2.13 lib/yao/resources/user.rb