Class: Latest::JRuby
- Inherits:
-
Object
- Object
- Latest::JRuby
- Defined in:
- lib/latest_ruby/rubies/jruby.rb
Constant Summary collapse
- SOURCE =
'http://jruby.org.s3.amazonaws.com/downloads/'
- WEB_SOURCE =
'http://jruby.org/download'
- AVAILABLE_EXTS =
['.tar.gz', '.zip']
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#web_source ⇒ Object
readonly
Returns the value of attribute web_source.
Instance Method Summary collapse
-
#initialize(retriever) ⇒ JRuby
constructor
A new instance of JRuby.
- #link(ext = '.tar.gz') ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(retriever) ⇒ JRuby
Returns a new instance of JRuby.
10 11 12 13 |
# File 'lib/latest_ruby/rubies/jruby.rb', line 10 def initialize(retriever) @retriever = retriever @source = WEB_SOURCE end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
8 9 10 |
# File 'lib/latest_ruby/rubies/jruby.rb', line 8 def source @source end |
#web_source ⇒ Object (readonly)
Returns the value of attribute web_source.
8 9 10 |
# File 'lib/latest_ruby/rubies/jruby.rb', line 8 def web_source @web_source end |
Instance Method Details
#link(ext = '.tar.gz') ⇒ Object
19 20 21 22 23 |
# File 'lib/latest_ruby/rubies/jruby.rb', line 19 def link(ext = '.tar.gz') if AVAILABLE_EXTS.include?(ext) SOURCE + '/' + version.to_s + '/jruby-bin-' + version.to_s + ext end end |
#version ⇒ Object
15 16 17 |
# File 'lib/latest_ruby/rubies/jruby.rb', line 15 def version @version ||= @retriever.retrieve(self) end |