Class: CoachZed::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/coach_zed.rb,
sig/coach_zed.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workout_catalog_dir: nil, model: nil, output_dir: nil, feed_output_basename: nil, feed_title: nil, existing_feed_path: nil, existing_schedule_path: nil, merge_policy: nil) ⇒ Config

Returns a new instance of Config.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/coach_zed.rb', line 25

def initialize(
  workout_catalog_dir: nil,
  model: nil,
  output_dir: nil,
  feed_output_basename: nil,
  feed_title: nil,
  existing_feed_path: nil,
  existing_schedule_path: nil,
  merge_policy: nil
)
  @workout_catalog_dir = workout_catalog_dir
  @model = model
  @output_dir = output_dir
  @feed_output_basename = feed_output_basename
  @feed_title = feed_title
  @existing_feed_path = existing_feed_path
  @existing_schedule_path = existing_schedule_path
  @merge_policy = merge_policy
end

Instance Attribute Details

#existing_feed_pathString?

Returns the value of attribute existing_feed_path.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def existing_feed_path
  @existing_feed_path
end

#existing_schedule_pathString?

Returns the value of attribute existing_schedule_path.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def existing_schedule_path
  @existing_schedule_path
end

#feed_output_basenameString?

Returns the value of attribute feed_output_basename.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def feed_output_basename
  @feed_output_basename
end

#feed_titleString?

Returns the value of attribute feed_title.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def feed_title
  @feed_title
end

#merge_policyString?

Returns the value of attribute merge_policy.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def merge_policy
  @merge_policy
end

#modelString?

Returns the value of attribute model.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def model
  @model
end

#output_dirString?

Returns the value of attribute output_dir.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def output_dir
  @output_dir
end

#workout_catalog_dirString?

Returns the value of attribute workout_catalog_dir.

Returns:

  • (String, nil)


23
24
25
# File 'lib/coach_zed.rb', line 23

def workout_catalog_dir
  @workout_catalog_dir
end

Instance Method Details

#apply(hash) ⇒ void

This method returns an undefined value.

Parameters:

  • (Hash[untyped, untyped])


45
46
47
48
49
# File 'lib/coach_zed.rb', line 45

def apply(hash)
  hash.each do |key, value|
    public_send("#{key}=", value) if respond_to?("#{key}=")
  end
end