Class: Travis::Client::EnvVar
Defined Under Namespace
Classes: List
Constant Summary
Constants inherited from Entity
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#public ⇒ Object
readonly
Returns the value of attribute public.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
-
#repository_id ⇒ Object
readonly
Returns the value of attribute repository_id.
Attributes inherited from Entity
#attributes, #curry, #id, #session
Class Method Summary collapse
Instance Method Summary collapse
Methods included from HasUuid
Methods included from NotLoadable
Methods inherited from Entity
#[], #[]=, aka, #attribute_names, attributes, base_path, #cancelable?, cast_id, #complete?, has, has_singleton, id?, id_field, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, preloadable, preloadable?, relations, #relations, #reload, #restartable?, subclass_for, subclasses, time, #to_h, #update_attributes, weak?
Constructor Details
This class inherits a constructor from Travis::Client::Entity
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1 2 3 |
# File 'lib/travis/client/env_var.rb', line 1 def name @name end |
#public ⇒ Object (readonly)
Returns the value of attribute public.
1 2 3 |
# File 'lib/travis/client/env_var.rb', line 1 def public @public end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
1 2 3 |
# File 'lib/travis/client/env_var.rb', line 1 def repository @repository end |
#repository_id ⇒ Object (readonly)
Returns the value of attribute repository_id.
1 2 3 |
# File 'lib/travis/client/env_var.rb', line 1 def repository_id @repository_id end |
Class Method Details
.path(object) ⇒ Object
67 68 69 70 71 |
# File 'lib/travis/client/env_var.rb', line 67 def self.path(object) repository_id = Repository === object ? object.id : object.repository_id raise "repository unknown" unless repository_id "/settings/env_vars/#{object.id if object.is_a? EnvVar}?repository_id=#{repository_id}" end |
Instance Method Details
#delete ⇒ Object
91 92 93 94 95 |
# File 'lib/travis/client/env_var.rb', line 91 def delete session.delete_raw EnvVar.path(self) repository.env_vars.reload true end |
#inspect_info ⇒ Object
97 98 99 |
# File 'lib/travis/client/env_var.rb', line 97 def inspect_info "#{name}=#{value ? value.inspect : "[secure]"}" end |