class ThriftModel

Constants

DEFAULT_OPTIONS

Attributes

ip[RW]
port[RW]
selectorSize[RW]
serviceName[RW]
serviceType[RW]
workerSize[RW]

Public Class Methods

new(options) click to toggle source
# File lib/reminder-client/thrift_model.rb, line 13
def initialize(options)
  raise "initialize ThriftModel error, options can not be nil." if options == nil 
  #@options = DEFAULT_OPTIONS.merge(options)
  @ip = options[:ip]
  @port = options[:port]
  @serviceType = options[:serviceType]
  @serviceName = options[:serviceName]
  @workerSize = options[:workerSize]
  @selectorSize =  options[:selectorSize]
end

Public Instance Methods

to_hash() click to toggle source
# File lib/reminder-client/thrift_model.rb, line 24
def to_hash
  {
  :ip => @ip,
  :port => @port,
  :serviceType => @serviceType,
  :serviceName => @serviceName,
  :workerSize => @workerSize,
  :selectorSize => @selectorSize
  }
end