Class: GreenDay::Contest

Inherits:
Object
  • Object
show all
Defined in:
lib/green_day/contest.rb

Defined Under Namespace

Classes: TaskSource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(contest_name) ⇒ Contest

Returns a new instance of Contest.



10
11
12
13
14
15
16
# File 'lib/green_day/contest.rb', line 10

def initialize(contest_name)
  @name = contest_name

  @task_sources = fetch_task_names_and_paths.map do |name, path|
    TaskSource.new(name, path, @name)
  end
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/green_day/contest.rb', line 8

def name
  @name
end

#task_sourcesObject (readonly)

Returns the value of attribute task_sources.



8
9
10
# File 'lib/green_day/contest.rb', line 8

def task_sources
  @task_sources
end