Class: Mashery::Role

Inherits:
ApiObjectBase show all
Defined in:
lib/mashery/role.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiObjectBase

delete, fetch, #initialize, method

Constructor Details

This class inherits a constructor from Mashery::ApiObjectBase

Instance Attribute Details

#createdObject (readonly)

Returns the value of attribute created.



3
4
5
# File 'lib/mashery/role.rb', line 3

def created
  @created
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/mashery/role.rb', line 4

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/mashery/role.rb', line 3

def id
  @id
end

#is_assignableObject (readonly)

Returns the value of attribute is_assignable.



3
4
5
# File 'lib/mashery/role.rb', line 3

def is_assignable
  @is_assignable
end

#is_predefinedObject (readonly)

Returns the value of attribute is_predefined.



3
4
5
# File 'lib/mashery/role.rb', line 3

def is_predefined
  @is_predefined
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/mashery/role.rb', line 4

def name
  @name
end

#updatedObject (readonly)

Returns the value of attribute updated.



3
4
5
# File 'lib/mashery/role.rb', line 3

def updated
  @updated
end

Class Method Details

.create(name, fields = {}) ⇒ Object



14
15
16
17
18
# File 'lib/mashery/role.rb', line 14

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

Instance Method Details

#assignable?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/mashery/role.rb', line 6

def assignable?
  is_assignable == true
end

#predefined?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/mashery/role.rb', line 10

def predefined?
  is_predefined == true
end