Class: Converted
- Inherits:
-
Object
- Object
- Converted
- Defined in:
- lib/swftly/converted.rb
Constant Summary collapse
- MATCHER =
/swiffyobject\s*?=\s*?(\{.*\})/
Instance Attribute Summary collapse
-
#json_blob ⇒ Object
readonly
Returns the value of attribute json_blob.
-
#markup ⇒ Object
readonly
Returns the value of attribute markup.
Instance Method Summary collapse
-
#initialize(markup) ⇒ Converted
constructor
A new instance of Converted.
- #json_definition ⇒ Object
Constructor Details
#initialize(markup) ⇒ Converted
Returns a new instance of Converted.
5 6 7 |
# File 'lib/swftly/converted.rb', line 5 def initialize(markup) @markup = markup end |
Instance Attribute Details
#json_blob ⇒ Object (readonly)
Returns the value of attribute json_blob.
3 4 5 |
# File 'lib/swftly/converted.rb', line 3 def json_blob @json_blob end |
#markup ⇒ Object (readonly)
Returns the value of attribute markup.
3 4 5 |
# File 'lib/swftly/converted.rb', line 3 def markup @markup end |
Instance Method Details
#json_definition ⇒ Object
9 10 11 12 |
# File 'lib/swftly/converted.rb', line 9 def json_definition @json_blob ||= @markup.match(MATCHER).to_s @json_blob end |