Class: SavedConfig

Inherits:
Object
  • Object
show all
Defined in:
app/saved_config.rb

Overview

Config for saved files.

Instance Attribute Summary collapse

Instance Method Summary collapse

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))
  author = Args.fetch_non_empty_hash(hash, :author)
  @author_name = Args.fetch_non_empty_string(author, :name).strip
  @author_email = Args.fetch_non_empty_string(author, :email).strip
end

Instance Attribute Details

#author_emailObject (readonly)

Returns the value of attribute author_email.



7
8
9
# File 'app/saved_config.rb', line 7

def author_email
  @author_email
end

#author_nameObject (readonly)

Returns the value of attribute author_name.



7
8
9
# File 'app/saved_config.rb', line 7

def author_name
  @author_name
end

#branchObject (readonly)

Returns the value of attribute branch.



7
8
9
# File 'app/saved_config.rb', line 7

def branch
  @branch
end

#ownerObject (readonly)

Returns the value of attribute owner.



7
8
9
# File 'app/saved_config.rb', line 7

def owner
  @owner
end

#regexObject (readonly)

Returns the value of attribute regex.



7
8
9
# File 'app/saved_config.rb', line 7

def regex
  @regex
end

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'app/saved_config.rb', line 7

def repo
  @repo
end

#tokenObject (readonly)

Returns the value of attribute token.



7
8
9
# File 'app/saved_config.rb', line 7

def token
  @token
end