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, feed_title: nil, existing_feed_path: nil) ⇒ Config

Returns a new instance of Config.



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

def initialize(
  workout_catalog_dir: nil,
  model: nil,
  output_dir: nil,
  feed_output_basename: nil,
  feed_title: nil,
  existing_feed_path: 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
end

Instance Attribute Details

#existing_feed_pathObject

Returns the value of attribute existing_feed_path.



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

def existing_feed_path
  @existing_feed_path
end

#feed_output_basenameObject

Returns the value of attribute feed_output_basename.



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

def feed_output_basename
  @feed_output_basename
end

#feed_titleObject

Returns the value of attribute feed_title.



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

def feed_title
  @feed_title
end

#modelObject

Returns the value of attribute model.



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

def model
  @model
end

#output_dirObject

Returns the value of attribute output_dir.



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

def output_dir
  @output_dir
end

#workout_catalog_dirObject

Returns the value of attribute workout_catalog_dir.



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

def workout_catalog_dir
  @workout_catalog_dir
end

Instance Method Details

#apply(hash) ⇒ Object



40
41
42
43
44
# File 'lib/coach_zed.rb', line 40

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