Class: SavedConfig
- Inherits:
-
Object
- Object
- SavedConfig
- Defined in:
- app/saved_config.rb
Overview
Config for saved files.
Instance Attribute Summary collapse
-
#author_email ⇒ Object
readonly
Returns the value of attribute author_email.
-
#author_name ⇒ Object
readonly
Returns the value of attribute author_name.
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#regex ⇒ Object
readonly
Returns the value of attribute regex.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(hash) ⇒ SavedConfig
constructor
A new instance of SavedConfig.
Constructor Details
#initialize(hash) ⇒ SavedConfig
Returns a new instance of SavedConfig.
9 10 11 12 13 14 15 16 17 18 |
# File 'app/saved_config.rb', line 9 def initialize(hash) @token = Args.fetch_non_empty_string(hash, :token).strip @owner = Args.fetch_non_empty_string(hash, :owner).strip @repo = Args.fetch_non_empty_string(hash, :repo).strip @branch = Args.fetch_non_empty_string(hash, :branch).strip @regex = Regexp.new(Args.fetch_non_empty_string(hash, :regex)) = Args.fetch_non_empty_hash(hash, :author) = Args.fetch_non_empty_string(, :name).strip = Args.fetch_non_empty_string(, :email).strip end |
Instance Attribute Details
#author_email ⇒ Object (readonly)
Returns the value of attribute author_email.
7 8 9 |
# File 'app/saved_config.rb', line 7 def end |
#author_name ⇒ Object (readonly)
Returns the value of attribute author_name.
7 8 9 |
# File 'app/saved_config.rb', line 7 def end |
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
7 8 9 |
# File 'app/saved_config.rb', line 7 def branch @branch end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
7 8 9 |
# File 'app/saved_config.rb', line 7 def owner @owner end |
#regex ⇒ Object (readonly)
Returns the value of attribute regex.
7 8 9 |
# File 'app/saved_config.rb', line 7 def regex @regex end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
7 8 9 |
# File 'app/saved_config.rb', line 7 def repo @repo end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'app/saved_config.rb', line 7 def token @token end |