Class: Worklog::Configuration::ProjectConfig
- Inherits:
-
Object
- Object
- Worklog::Configuration::ProjectConfig
- Defined in:
- lib/configuration.rb
Overview
Configuration for projects
Instance Attribute Summary collapse
-
#show_last ⇒ Integer
Number of last projects to show in the project list.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ProjectConfig
constructor
Initialize with default values, parameters can be overridden via hash.
Constructor Details
#initialize(params = {}) ⇒ ProjectConfig
Initialize with default values, parameters can be overridden via hash
47 48 49 50 51 52 53 |
# File 'lib/configuration.rb', line 47 def initialize(params = {}) return if params.nil? params.each do |key, value| instance_variable_set("@#{key}", value) if respond_to?("#{key}=") end end |
Instance Attribute Details
#show_last ⇒ Integer
Returns Number of last projects to show in the project list.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/configuration.rb', line 41 class ProjectConfig attr_accessor :show_last # Initialize with default values, parameters can be overridden via hash # @example # ProjectConfig.new({'show_last' => 5}) def initialize(params = {}) return if params.nil? params.each do |key, value| instance_variable_set("@#{key}", value) if respond_to?("#{key}=") end end end |