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.2.12 lib/yao/resources/user.rb
yao-0.2.11 lib/yao/resources/user.rb
yao-0.2.10 lib/yao/resources/user.rb
yao-0.2.9 lib/yao/resources/user.rb
yao-0.2.8 lib/yao/resources/user.rb
yao-0.2.7 lib/yao/resources/user.rb
yao-0.2.6 lib/yao/resources/user.rb
yao-0.2.5 lib/yao/resources/user.rb
yao-0.2.4 lib/yao/resources/user.rb
yao-0.2.2 lib/yao/resources/user.rb
yao-0.2.1 lib/yao/resources/user.rb
yao-0.2.0 lib/yao/resources/user.rb
yao-0.2.0.rc1 lib/yao/resources/user.rb
yao-0.1.1 lib/yao/resources/user.rb
yao-0.1.0 lib/yao/resources/user.rb