Sha256: 23564bede3c02c74a82b315185e68d3b37f130c24e8419884b3050a54d418e5c

Contents?: true

Size: 418 Bytes

Versions: 6

Compression:

Stored size: 418 Bytes

Contents

module Masheri
  class Role < ApiObjectBase
    attr_reader :id, :created, :updated, :is_assignable, :is_predefined
    attr_accessor :name, :description

    def assignable?
      is_assignable == true
    end

    def predefined?
      is_predefined == true
    end

    def self.create(name, fields = {})
      fields ||= {}
      our_fields = fields.merge('name' => name)
      super(our_fields)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
masheri-0.3.5 lib/masheri/role.rb
masheri-0.3.4 lib/masheri/role.rb
masheri-0.3.1 lib/masheri/role.rb
masheri-0.2.0 lib/masheri/role.rb
masheri-0.1.1 lib/masheri/role.rb
masheri-0.1.0 lib/masheri/role.rb