Class: SleeperFF::Draft
- Inherits:
-
Object
show all
- Defined in:
- lib/sleeper_ff/draft.rb
Instance Method Summary
collapse
Constructor Details
#initialize(data, client) ⇒ Draft
Returns a new instance of Draft.
5
6
7
8
|
# File 'lib/sleeper_ff/draft.rb', line 5
def initialize(data, client)
@data = data
@client = client
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/sleeper_ff/draft.rb', line 22
def method_missing(method_name, *args, &block)
if @data.respond_to?(method_name)
@data.send(method_name, *args, &block)
else
super
end
end
|
Instance Method Details
#picks ⇒ Object
10
11
12
|
# File 'lib/sleeper_ff/draft.rb', line 10
def picks
@client.draft_picks(@data.draft_id)
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
18
19
20
|
# File 'lib/sleeper_ff/draft.rb', line 18
def respond_to_missing?(method_name, include_private = false)
@data.respond_to?(method_name) || super
end
|
#traded_picks ⇒ Object
14
15
16
|
# File 'lib/sleeper_ff/draft.rb', line 14
def traded_picks
@client.draft_traded_picks(@data.draft_id)
end
|