Class: Michael::Models::Guard
- Defined in:
- lib/michael/models/guard.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#repos_config ⇒ Object
readonly
Returns the value of attribute repos_config.
Instance Method Summary collapse
-
#initialize ⇒ Guard
constructor
A new instance of Guard.
Methods inherited from Command
#command, #cursor, #editor, #exec_exist?, #execute, #generator, #pager, #pastel, #platform, #prompt, #screen, #spinner, #which
Constructor Details
#initialize ⇒ Guard
Returns a new instance of Guard.
11 12 13 14 15 16 17 |
# File 'lib/michael/models/guard.rb', line 11 def initialize @config = Configuration.new @repos_config = Configuration.new(config_name: 'repositories') token_valid = Github::TokenValidator.token_valid?(config.fetch(:token)) abort 'Your token is invalid' unless token_valid end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/michael/models/guard.rb', line 9 def config @config end |
#repos_config ⇒ Object (readonly)
Returns the value of attribute repos_config.
9 10 11 |
# File 'lib/michael/models/guard.rb', line 9 def repos_config @repos_config end |