Class: Travis::Client::Artifact
- Defined in:
- lib/travis/client/artifact.rb
Constant Summary
Constants inherited from Entity
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#job ⇒ Object
readonly
Returns the value of attribute job.
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Entity
#attributes, #curry, #id, #session
Instance Method Summary collapse
Methods inherited from Entity
#[], #[]=, aka, #attribute_names, attributes, cast_id, #complete?, has, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, relations, #relations, #reload, subclass_for, subclasses, time, #update_attributes
Constructor Details
This class inherits a constructor from Travis::Client::Entity
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
1 2 3 |
# File 'lib/travis/client/artifact.rb', line 1 def body @body end |
#job ⇒ Object (readonly)
Returns the value of attribute job.
1 2 3 |
# File 'lib/travis/client/artifact.rb', line 1 def job @job end |
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id.
1 2 3 |
# File 'lib/travis/client/artifact.rb', line 1 def job_id @job_id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
1 2 3 |
# File 'lib/travis/client/artifact.rb', line 1 def type @type end |
Instance Method Details
#clean_body ⇒ Object
22 23 24 |
# File 'lib/travis/client/artifact.rb', line 22 def clean_body attributes['clean_body'] ||= colorized_body.gsub(/\e[^m]+m/, '') end |
#colorized_body ⇒ Object
18 19 20 |
# File 'lib/travis/client/artifact.rb', line 18 def colorized_body attributes['colorized_body'] ||= encoded_body.gsub(/[^[:print:]\e\n]/, '') end |
#encoded_body ⇒ Object
13 14 15 16 |
# File 'lib/travis/client/artifact.rb', line 13 def encoded_body return body unless body.respond_to? :encode body.encode 'utf-8' end |