Class: Avm::EacRubyBase1::Sources::GemfileLocal::Sibling

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb

Instance Method Summary collapse

Instance Method Details

#gemspec_relative_pathString

Returns:

  • (String)


12
13
14
# File 'lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb', line 12

def gemspec_relative_path
  source.gemspec_path.relative_path_from(gemfile_local.source.path).to_path
end

#root_relative_pathString

Returns:

  • (String)


17
18
19
# File 'lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb', line 17

def root_relative_path
  source.path.relative_path_from(gemfile_local.source.path).to_path
end

#target_contentString

Returns:

  • (String)


22
23
24
# File 'lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb', line 22

def target_content
  "gem '#{source.gem_name}', #{gem_options_content} if #{condition_content}\n"
end