Class: TorigoyaKit::ExecutionSetting
- Inherits:
-
Object
- Object
- TorigoyaKit::ExecutionSetting
- Defined in:
- lib/torigoya_kit/ticket.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#cpu_limit ⇒ Object
readonly
Returns the value of attribute cpu_limit.
-
#envs ⇒ Object
readonly
Returns the value of attribute envs.
-
#memory_limit ⇒ Object
readonly
Returns the value of attribute memory_limit.
Instance Method Summary collapse
- #==(rhs) ⇒ Object
-
#initialize(args, envs, cpu_limit, memory_limit) ⇒ ExecutionSetting
constructor
A new instance of ExecutionSetting.
- #to_hash ⇒ Object
- #to_msgpack(out = '') ⇒ Object
Constructor Details
#initialize(args, envs, cpu_limit, memory_limit) ⇒ ExecutionSetting
Returns a new instance of ExecutionSetting.
59 60 61 62 63 64 65 66 |
# File 'lib/torigoya_kit/ticket.rb', line 59 def initialize(args, envs, cpu_limit, memory_limit) @args = args # Array!String @envs = envs # Array!String @cpu_limit = cpu_limit # uint64 / sec @memory_limit = memory_limit # uint64 / bytes validate end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
67 68 69 |
# File 'lib/torigoya_kit/ticket.rb', line 67 def args @args end |
#cpu_limit ⇒ Object (readonly)
Returns the value of attribute cpu_limit.
67 68 69 |
# File 'lib/torigoya_kit/ticket.rb', line 67 def cpu_limit @cpu_limit end |
#envs ⇒ Object (readonly)
Returns the value of attribute envs.
67 68 69 |
# File 'lib/torigoya_kit/ticket.rb', line 67 def envs @envs end |
#memory_limit ⇒ Object (readonly)
Returns the value of attribute memory_limit.
67 68 69 |
# File 'lib/torigoya_kit/ticket.rb', line 67 def memory_limit @memory_limit end |
Instance Method Details
#==(rhs) ⇒ Object
82 83 84 85 86 87 |
# File 'lib/torigoya_kit/ticket.rb', line 82 def ==(rhs) return @args == rhs.args && @envs == rhs.envs && @cpu_limit == rhs.cpu_limit && @memory_limit == rhs.memory_limit end |
#to_hash ⇒ Object
69 70 71 72 73 74 75 76 |
# File 'lib/torigoya_kit/ticket.rb', line 69 def to_hash return { args: @args, envs: @envs, cpu_time_limit: @cpu_limit, memory_bytes_limit: @memory_limit } end |
#to_msgpack(out = '') ⇒ Object
78 79 80 |
# File 'lib/torigoya_kit/ticket.rb', line 78 def to_msgpack(out = '') return to_hash.to_msgpack(out) end |