Class: Woody::Decorators::Submission

Inherits:
Base
  • Object
show all
Defined in:
lib/woody/decorators/submission.rb

Instance Method Summary collapse

Methods inherited from Base

#method_missing

Constructor Details

#initialize(model, config) ⇒ Submission

Returns a new instance of Submission.



8
9
10
11
# File 'lib/woody/decorators/submission.rb', line 8

def initialize(model, config)
  @config = config
  super(model)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Woody::Decorators::Base

Instance Method Details

#challengeObject



13
14
15
16
17
18
# File 'lib/woody/decorators/submission.rb', line 13

def challenge
  @challenge ||= Woody::Decorators::Challenge.new(
    Wes::Data::API::Challenge.find(:id, @model.challenge_id),
    @config
  )
end