Class: Iremocon
- Inherits:
-
Object
- Object
- Iremocon
- Defined in:
- lib/iremocon.rb,
lib/iremocon/version.rb
Defined Under Namespace
Classes: ConnectionError
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#telnet ⇒ Object
readonly
Returns the value of attribute telnet.
Instance Method Summary collapse
- #au ⇒ Object
- #cc ⇒ Object
- #ic(channel) ⇒ Object
-
#initialize(host, port = 51013) ⇒ Iremocon
constructor
A new instance of Iremocon.
- #is(channel) ⇒ Object
- #td(timer_id) ⇒ Object
- #tg ⇒ Object
- #tl ⇒ Object
- #tm(channel, time, interval = 0) ⇒ Object
- #ts(time) ⇒ Object
- #vr ⇒ Object
Constructor Details
#initialize(host, port = 51013) ⇒ Iremocon
Returns a new instance of Iremocon.
7 8 9 10 11 |
# File 'lib/iremocon.rb', line 7 def initialize(host, port = 51013) @host = host @port = port connect end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/iremocon.rb', line 5 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
5 6 7 |
# File 'lib/iremocon.rb', line 5 def port @port end |
#telnet ⇒ Object (readonly)
Returns the value of attribute telnet.
5 6 7 |
# File 'lib/iremocon.rb', line 5 def telnet @telnet end |
Instance Method Details
#au ⇒ Object
13 14 15 |
# File 'lib/iremocon.rb', line 13 def au command("au") end |
#cc ⇒ Object
25 26 27 |
# File 'lib/iremocon.rb', line 25 def cc command("cc") end |
#ic(channel) ⇒ Object
21 22 23 |
# File 'lib/iremocon.rb', line 21 def ic(channel) command("ic", channel) end |
#is(channel) ⇒ Object
17 18 19 |
# File 'lib/iremocon.rb', line 17 def is(channel) command("is", channel) end |
#td(timer_id) ⇒ Object
37 38 39 |
# File 'lib/iremocon.rb', line 37 def td(timer_id) command("td", timer_id) end |
#tg ⇒ Object
45 46 47 |
# File 'lib/iremocon.rb', line 45 def tg command("tg") end |
#tl ⇒ Object
33 34 35 |
# File 'lib/iremocon.rb', line 33 def tl command("tl") end |
#tm(channel, time, interval = 0) ⇒ Object
29 30 31 |
# File 'lib/iremocon.rb', line 29 def tm(channel, time, interval = 0) command("tm", channel, time.to_i, interval) end |
#ts(time) ⇒ Object
41 42 43 |
# File 'lib/iremocon.rb', line 41 def ts(time) command("ts", time.to_i) end |
#vr ⇒ Object
49 50 51 |
# File 'lib/iremocon.rb', line 49 def vr command("vr") end |