Class: TorigoyaKit::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/torigoya_kit/ticket.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdin, run_setting) ⇒ Input

Returns a new instance of Input.



133
134
135
136
137
138
# File 'lib/torigoya_kit/ticket.rb', line 133

def initialize(stdin, run_setting)
  @stdin = stdin                # SourceData?
  @run_setting = run_setting    # ExecutionSetting

  validate
end

Instance Attribute Details

#run_settingObject (readonly)

Returns the value of attribute run_setting.



139
140
141
# File 'lib/torigoya_kit/ticket.rb', line 139

def run_setting
  @run_setting
end

#stdinObject (readonly)

Returns the value of attribute stdin.



139
140
141
# File 'lib/torigoya_kit/ticket.rb', line 139

def stdin
  @stdin
end

Instance Method Details

#==(rhs) ⇒ Object



152
153
154
155
# File 'lib/torigoya_kit/ticket.rb', line 152

def ==(rhs)
  return @stdin == rhs.stdin &&
    @run_settings == rhs.run_settings
end

#to_hashObject



141
142
143
144
145
146
# File 'lib/torigoya_kit/ticket.rb', line 141

def to_hash
  return {
    stdin: @stdin,
    run_setting: @run_setting.to_hash
  }
end

#to_msgpack(out = '') ⇒ Object



148
149
150
# File 'lib/torigoya_kit/ticket.rb', line 148

def to_msgpack(out = '')
  return to_hash.to_msgpack(out)
end