Class: EasyCreds::Projects::Project
- Inherits:
-
Data
- Object
- Data
- EasyCreds::Projects::Project
- Defined in:
- lib/easy_creds/projects/registry.rb
Instance Attribute Summary collapse
-
#github_url ⇒ Object
readonly
Returns the value of attribute github_url.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#last_seen_at ⇒ Object
readonly
Returns the value of attribute last_seen_at.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#registered_at ⇒ Object
readonly
Returns the value of attribute registered_at.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
Instance Attribute Details
#github_url ⇒ Object (readonly)
Returns the value of attribute github_url
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def github_url @github_url end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def kind @kind end |
#last_seen_at ⇒ Object (readonly)
Returns the value of attribute last_seen_at
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def last_seen_at @last_seen_at end |
#name ⇒ Object (readonly)
Returns the value of attribute name
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def path @path end |
#registered_at ⇒ Object (readonly)
Returns the value of attribute registered_at
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def registered_at @registered_at end |
#template ⇒ Object (readonly)
Returns the value of attribute template
5 6 7 |
# File 'lib/easy_creds/projects/registry.rb', line 5 def template @template end |
Instance Method Details
#display_path ⇒ Object
9 |
# File 'lib/easy_creds/projects/registry.rb', line 9 def display_path = path.sub(Dir.home, '~') |
#exists_on_disk? ⇒ Boolean
8 |
# File 'lib/easy_creds/projects/registry.rb', line 8 def exists_on_disk? = File.directory?(path) |
#rails? ⇒ Boolean
10 |
# File 'lib/easy_creds/projects/registry.rb', line 10 def rails? = kind == :rails |
#to_h_yaml ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/easy_creds/projects/registry.rb', line 12 def to_h_yaml { 'name' => name, 'path' => path, 'kind' => kind.to_s, 'github_url' => github_url, 'template' => template&.to_s, 'last_seen_at' => last_seen_at&.iso8601, 'registered_at' => registered_at&.iso8601 }.compact end |