Class: Superset::Security::Role::Create
- Defined in:
- lib/superset/security/role/create.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(name: '') ⇒ Create
constructor
A new instance of Create.
- #response ⇒ Object
Methods inherited from Request
call, #query_params, #result, #superset_host
Methods included from Display
#display_headers, #headings, #list, #list_attributes, #result, #rows, #table, #title
Constructor Details
#initialize(name: '') ⇒ Create
Returns a new instance of Create.
7 8 9 |
# File 'lib/superset/security/role/create.rb', line 7 def initialize(name: '') @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/superset/security/role/create.rb', line 5 def name @name end |
Instance Method Details
#response ⇒ Object
11 12 13 14 15 |
# File 'lib/superset/security/role/create.rb', line 11 def response raise InvalidParameterError unless name.present? @response ||= client.post(route, { 'name' => name } ) end |