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)


14
15
16
# File 'lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb', line 14

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

#root_relative_pathString

Returns:

  • (String)


19
20
21
# File 'lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb', line 19

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

#target_contentString

Returns:

  • (String)


24
25
26
# File 'lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb', line 24

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