Class: CoachZed::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Config.



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/coach_zed.rb', line 23

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

Instance Attribute Details

#existing_feed_pathObject

Returns the value of attribute existing_feed_path.



21
22
23
# File 'lib/coach_zed.rb', line 21

def existing_feed_path
  @existing_feed_path
end

#feed_output_basenameObject

Returns the value of attribute feed_output_basename.



21
22
23
# File 'lib/coach_zed.rb', line 21

def feed_output_basename
  @feed_output_basename
end

#modelObject

Returns the value of attribute model.



21
22
23
# File 'lib/coach_zed.rb', line 21

def model
  @model
end

#output_dirObject

Returns the value of attribute output_dir.



21
22
23
# File 'lib/coach_zed.rb', line 21

def output_dir
  @output_dir
end

#workout_catalog_dirObject

Returns the value of attribute workout_catalog_dir.



21
22
23
# File 'lib/coach_zed.rb', line 21

def workout_catalog_dir
  @workout_catalog_dir
end

Instance Method Details

#apply(hash) ⇒ Object



37
38
39
40
41
# File 'lib/coach_zed.rb', line 37

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