travis-api/lib/travis/api/v2/http/env_var.rb
2014-07-16 18:14:52 +02:00

24 lines
469 B
Ruby

module Travis
module Api
module V2
module Http
class EnvVar < Travis::Api::Serializer
attributes :id, :name, :value, :public, :repository_id
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