Class: CGMiner::API::Client
- Inherits:
-
Object
- Object
- CGMiner::API::Client
- Defined in:
- lib/cgminer/api/client.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
- #asc(index) ⇒ Object
- #asccount ⇒ Object
- #check(command) ⇒ Object
- #coin ⇒ Object
- #config ⇒ Object
- #devdetails ⇒ Object
- #devs ⇒ Object
- #gpu(index) ⇒ Object
- #gpucount ⇒ Object
-
#initialize(host, port) ⇒ Client
constructor
A new instance of Client.
- #pga(index) ⇒ Object
- #pgacount ⇒ Object
- #pools ⇒ Object
- #stats ⇒ Object
- #summary ⇒ Object
- #usbstats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(host, port) ⇒ Client
Returns a new instance of Client.
10 11 12 13 |
# File 'lib/cgminer/api/client.rb', line 10 def initialize(host, port) @host = host @port = port end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/cgminer/api/client.rb', line 6 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
8 9 10 |
# File 'lib/cgminer/api/client.rb', line 8 def port @port end |
Instance Method Details
#asc(index) ⇒ Object
15 16 17 |
# File 'lib/cgminer/api/client.rb', line 15 def asc(index) command(:asc, index) end |
#asccount ⇒ Object
19 20 21 |
# File 'lib/cgminer/api/client.rb', line 19 def asccount command(:asccount) end |
#check(command) ⇒ Object
24 25 26 |
# File 'lib/cgminer/api/client.rb', line 24 def check(command) command(:check, command) end |
#coin ⇒ Object
28 29 30 |
# File 'lib/cgminer/api/client.rb', line 28 def coin command(:coin) end |
#config ⇒ Object
32 33 34 |
# File 'lib/cgminer/api/client.rb', line 32 def config command(:config) end |
#devdetails ⇒ Object
36 37 38 |
# File 'lib/cgminer/api/client.rb', line 36 def devdetails command(:devdetails) end |
#devs ⇒ Object
40 41 42 |
# File 'lib/cgminer/api/client.rb', line 40 def devs command(:devs) end |
#gpu(index) ⇒ Object
44 45 46 |
# File 'lib/cgminer/api/client.rb', line 44 def gpu(index) command(:gpu, index) end |
#gpucount ⇒ Object
48 49 50 |
# File 'lib/cgminer/api/client.rb', line 48 def gpucount command(:gpucount) end |
#pga(index) ⇒ Object
52 53 54 |
# File 'lib/cgminer/api/client.rb', line 52 def pga(index) command(:pga, index) end |
#pgacount ⇒ Object
56 57 58 |
# File 'lib/cgminer/api/client.rb', line 56 def pgacount command(:pgacount) end |
#pools ⇒ Object
60 61 62 |
# File 'lib/cgminer/api/client.rb', line 60 def pools command(:pools) end |
#stats ⇒ Object
64 65 66 |
# File 'lib/cgminer/api/client.rb', line 64 def stats command(:stats) end |
#summary ⇒ Object
68 69 70 |
# File 'lib/cgminer/api/client.rb', line 68 def summary command(:summary) end |
#usbstats ⇒ Object
72 73 74 |
# File 'lib/cgminer/api/client.rb', line 72 def usbstats command(:usbstats) end |
#version ⇒ Object
76 77 78 |
# File 'lib/cgminer/api/client.rb', line 76 def version command(:version) end |