Class: HaveAPI::Fs::Components::ActionMessage

Inherits:
File show all
Defined in:
lib/haveapi/fs/components/action_message.rb

Instance Attribute Summary

Attributes inherited from HaveAPI::Fs::Component

#atime, #context, #ctime, #mtime

Instance Method Summary collapse

Methods inherited from File

#file?, #raw_close, #raw_open, #raw_read, #raw_sync, #raw_truncate, #raw_write, #size, #write

Methods inherited from HaveAPI::Fs::Component

#abspath, #bound=, #bound?, children_reader, component, #contents, #directory?, #executable?, #file?, #find, inherited, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #setup, #times, #title, #unsaved?, #use, #writable?

Constructor Details

#initialize(action_dir, *args) ⇒ ActionMessage

Returns a new instance of ActionMessage.



3
4
5
6
# File 'lib/haveapi/fs/components/action_message.rb', line 3

def initialize(action_dir, *args)
  super(*args)
  @action_dir = action_dir
end

Instance Method Details

#readObject



8
9
10
11
12
# File 'lib/haveapi/fs/components/action_message.rb', line 8

def read
  ret = @msg.to_s
  ret += "\n" unless ret.empty?
  ret
end

#set(msg) ⇒ Object



14
15
16
17
# File 'lib/haveapi/fs/components/action_message.rb', line 14

def set(msg)
  changed
  @msg = msg
end