class Vx::Builder::BuildConfiguration::Vexor

Attributes

attributes[R]

Public Class Methods

new(new_attributes) click to toggle source
# File lib/vx/builder/build_configuration/vexor.rb, line 8
def initialize(new_attributes)
  normalize_attributes(new_attributes)
end

Public Instance Methods

read_timeout() click to toggle source
# File lib/vx/builder/build_configuration/vexor.rb, line 17
def read_timeout
  tm = @attributes["read_timeout"].to_i
  tm.to_i > 0 ? tm.to_i : nil
end
timeout() click to toggle source
# File lib/vx/builder/build_configuration/vexor.rb, line 12
def timeout
  tm = @attributes["timeout"].to_i
  tm.to_i > 0 ? tm.to_i : nil
end

Private Instance Methods

normalize_attributes(new_attributes) click to toggle source
# File lib/vx/builder/build_configuration/vexor.rb, line 24
def normalize_attributes(new_attributes)
  @attributes =
    case new_attributes
    when Hash
      {
        "timeout"      => new_attributes["timeout"],
        "read_timeout" => new_attributes["read_timeout"],
      }
    else
      {}
    end

end