Class: TwitterCldr::Resources::Requirements::GitRequirement
- Inherits:
-
Object
- Object
- TwitterCldr::Resources::Requirements::GitRequirement
- Defined in:
- lib/twitter_cldr/resources/requirements/git_requirement.rb
Instance Attribute Summary collapse
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#repo_url ⇒ Object
readonly
Returns the value of attribute repo_url.
Instance Method Summary collapse
-
#initialize(repo_url, ref) ⇒ GitRequirement
constructor
A new instance of GitRequirement.
- #prepare ⇒ Object
- #source_path ⇒ Object
Constructor Details
#initialize(repo_url, ref) ⇒ GitRequirement
Returns a new instance of GitRequirement.
13 14 15 16 |
# File 'lib/twitter_cldr/resources/requirements/git_requirement.rb', line 13 def initialize(repo_url, ref) @repo_url = repo_url @ref = ref end |
Instance Attribute Details
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
11 12 13 |
# File 'lib/twitter_cldr/resources/requirements/git_requirement.rb', line 11 def ref @ref end |
#repo_url ⇒ Object (readonly)
Returns the value of attribute repo_url.
11 12 13 |
# File 'lib/twitter_cldr/resources/requirements/git_requirement.rb', line 11 def repo_url @repo_url end |
Instance Method Details
#prepare ⇒ Object
18 19 20 21 22 |
# File 'lib/twitter_cldr/resources/requirements/git_requirement.rb', line 18 def prepare check_git_available clone_or_fetch_if_necessary puts "Using repo in #{source_path}" end |
#source_path ⇒ Object
24 25 26 |
# File 'lib/twitter_cldr/resources/requirements/git_requirement.rb', line 24 def source_path @source_path ||= File.join(TwitterCldr::VENDOR_DIR, 'git', repo_name) end |