Class: Types::OverridenAnsibleVariable
- Inherits:
-
AnsibleVariable
- Object
- BaseObject
- AnsibleVariable
- Types::OverridenAnsibleVariable
- Defined in:
- app/graphql/types/overriden_ansible_variable.rb
Instance Method Summary collapse
Methods inherited from AnsibleVariable
Instance Method Details
#lookup_values(match: nil) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'app/graphql/types/overriden_ansible_variable.rb', line 20 def lookup_values(match: nil) return CollectionLoader.for(object.ansible_variable.class, :lookup_values).load(object.ansible_variable) unless match scope = lambda do |sc| sc.where(:match => match) end CollectionLoader.for(object.ansible_variable.class, :lookup_values, scope).load(object.ansible_variable) end |
#meta ⇒ Object
13 14 15 16 17 18 |
# File 'app/graphql/types/overriden_ansible_variable.rb', line 13 def { :can_edit => ::User.current.can?(object.ansible_variable.(:edit), object.ansible_variable), :can_destroy => ::User.current.can?(object.ansible_variable.(:destroy), object.ansible_variable) } end |