Class: Flydata::Helper::Action::ActionPosition

Inherits:
Object
  • Object
show all
Includes:
Util::FileUtil
Defined in:
lib/flydata/helper/action/check_remote_actions.rb

Instance Method Summary collapse

Methods included from Util::FileUtil

#read_line, #tail, #write_line

Constructor Details

#initialize(config) ⇒ ActionPosition

Returns a new instance of ActionPosition.



81
82
83
# File 'lib/flydata/helper/action/check_remote_actions.rb', line 81

def initialize(config)
  @path = config.helper_action_position_path
end

Instance Method Details

#loadObject



87
88
89
# File 'lib/flydata/helper/action/check_remote_actions.rb', line 87

def load
  read_line(@path).to_i
end

#save(position) ⇒ Object



84
85
86
# File 'lib/flydata/helper/action/check_remote_actions.rb', line 84

def save(position)
  write_line(@path, position.to_s)
end