Class: Tc4r::Build
- Inherits:
-
Object
- Object
- Tc4r::Build
- Includes:
- ActiveModel::Serializers::JSON
- Defined in:
- lib/tc4r/build.rb
Instance Attribute Summary collapse
-
#build_type_id ⇒ Object
readonly
Returns the value of attribute build_type_id.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #attributes ⇒ Object
- #download_file(file, options = {}) ⇒ Object
-
#initialize(options, client) ⇒ Build
constructor
A new instance of Build.
Constructor Details
#initialize(options, client) ⇒ Build
Returns a new instance of Build.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tc4r/build.rb', line 7 def initialize(,client) = Tc4r::Helpers.symbolize() @id = [:id] @number = [:number] @status = [:status] @build_type_id = [:build_type_id] @start_date = Time.parse([:start_date]) @href = [:href] @client = client end |
Instance Attribute Details
#build_type_id ⇒ Object (readonly)
Returns the value of attribute build_type_id.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def build_type_id @build_type_id end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def client @client end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def href @href end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def id @id end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def number @number end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def start_date @start_date end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/tc4r/build.rb', line 6 def status @status end |
Instance Method Details
#attributes ⇒ Object
18 19 20 |
# File 'lib/tc4r/build.rb', line 18 def attributes { :id => @id, :number => @number, :status => @status, :build_type_id => @build_type_id, :start_date => @start_date, :href => @href } end |
#download_file(file, options = {}) ⇒ Object
22 23 24 |
# File 'lib/tc4r/build.rb', line 22 def download_file(file, = {}) client.download_file(build_type_id,number,file,) end |