travis-api/lib/travis/api/v2/http/env_var.rb
2014-07-16 11:54:31 +02:00

24 lines
453 B
Ruby

module Travis
module Api
module V2
module Http
class EnvVar < Travis::Api::Serializer
attributes :id, :name, :value, :public
def value
if object.public?
object.value.decrypt
end
end
def serializable_hash
hash = super
hash.delete :value unless object.public?
hash
end
end
end
end
end
end