Class: Notiffany::Notifier::Emacs::Client::Elisp

Inherits:
ERB
  • Object
show all
Defined in:
lib/notiffany/notifier/emacs/client.rb

Overview

Creates a safe binding with local variables for ERB

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, color, bgcolor, message) ⇒ Elisp

Returns a new instance of Elisp.



15
16
17
18
19
20
21
# File 'lib/notiffany/notifier/emacs/client.rb', line 15

def initialize(code, color, bgcolor, message)
  @color = color
  @bgcolor = bgcolor
  @message = message
  @code = code
  super(@code)
end

Instance Attribute Details

#bgcolorObject (readonly)

Returns the value of attribute bgcolor.



12
13
14
# File 'lib/notiffany/notifier/emacs/client.rb', line 12

def bgcolor
  @bgcolor
end

#colorObject (readonly)

Returns the value of attribute color.



11
12
13
# File 'lib/notiffany/notifier/emacs/client.rb', line 11

def color
  @color
end

#messageObject (readonly)

Returns the value of attribute message.



13
14
15
# File 'lib/notiffany/notifier/emacs/client.rb', line 13

def message
  @message
end

Instance Method Details

#resultObject



23
24
25
# File 'lib/notiffany/notifier/emacs/client.rb', line 23

def result
  super(binding)
end