Class: Runtime
- Inherits:
-
Object
- Object
- Runtime
- Defined in:
- lib/swftly/runtime.rb
Instance Attribute Summary collapse
-
#markup ⇒ Object
readonly
Returns the value of attribute markup.
Instance Method Summary collapse
-
#initialize(markup) ⇒ Runtime
constructor
A new instance of Runtime.
- #url ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(markup) ⇒ Runtime
Returns a new instance of Runtime.
4 5 6 7 |
# File 'lib/swftly/runtime.rb', line 4 def initialize(markup) @markup = markup @urls = URI::extract @markup end |
Instance Attribute Details
#markup ⇒ Object (readonly)
Returns the value of attribute markup.
2 3 4 |
# File 'lib/swftly/runtime.rb', line 2 def markup @markup end |
Instance Method Details
#url ⇒ Object
13 14 15 |
# File 'lib/swftly/runtime.rb', line 13 def url @urls.detect { |d| d.match /runtime\.js/} #typically the first js file in the set. end |
#version ⇒ Object
9 10 11 |
# File 'lib/swftly/runtime.rb', line 9 def version url.split('/')[-2] #we'll strip out runtime version here end |