Module: CgminerApiClient::Miner::Commands::ReadOnly

Included in:
CgminerApiClient::Miner::Commands
Defined in:
lib/cgminer_api_client/miner/commands.rb

Instance Method Summary collapse

Instance Method Details

#asc(number) ⇒ Object



7
8
9
# File 'lib/cgminer_api_client/miner/commands.rb', line 7

def asc(number)
  query(:asc, number)
end

#asccountObject



11
12
13
# File 'lib/cgminer_api_client/miner/commands.rb', line 11

def asccount
  query(:asccount)
end

#check(command) ⇒ Object



15
16
17
# File 'lib/cgminer_api_client/miner/commands.rb', line 15

def check(command)
  query(:check, command)[0]
end

#coinObject



19
20
21
# File 'lib/cgminer_api_client/miner/commands.rb', line 19

def coin
  query(:coin)[0]
end

#configObject



23
24
25
# File 'lib/cgminer_api_client/miner/commands.rb', line 23

def config
  query(:config)[0]
end

#devdetailsObject



27
28
29
# File 'lib/cgminer_api_client/miner/commands.rb', line 27

def devdetails
  query(:devdetails)
end

#devsObject



31
32
33
# File 'lib/cgminer_api_client/miner/commands.rb', line 31

def devs
  query(:devs)
end

#notifyObject



58
59
60
# File 'lib/cgminer_api_client/miner/commands.rb', line 58

def notify
  query(:notify)
end

#pga(number) ⇒ Object



35
36
37
# File 'lib/cgminer_api_client/miner/commands.rb', line 35

def pga(number)
  query(:pga, number)
end

#pgacountObject



39
40
41
# File 'lib/cgminer_api_client/miner/commands.rb', line 39

def pgacount
  query(:pgacount)
end

#poolsObject



43
44
45
# File 'lib/cgminer_api_client/miner/commands.rb', line 43

def pools
  query(:pools)
end

#privilegedObject



47
48
49
50
51
52
53
54
55
56
# File 'lib/cgminer_api_client/miner/commands.rb', line 47

def privileged
  query(:privileged)
  true
rescue CgminerApiClient::ApiError
  # The miner answered and rejected: not privileged.
  false
  # ConnectionError and any other StandardError propagate so
  # callers don't misinterpret a transient network blip as
  # "access denied".
end

#statsObject



62
63
64
# File 'lib/cgminer_api_client/miner/commands.rb', line 62

def stats
  query(:stats)
end

#summaryObject



66
67
68
# File 'lib/cgminer_api_client/miner/commands.rb', line 66

def summary
  query(:summary)[0]
end

#usbstatsObject



70
71
72
# File 'lib/cgminer_api_client/miner/commands.rb', line 70

def usbstats
  query(:usbstats)
end

#versionObject



74
75
76
# File 'lib/cgminer_api_client/miner/commands.rb', line 74

def version
  query(:version)[0]
end