Class: Converted

Inherits:
Object
  • Object
show all
Defined in:
lib/swftly/converted.rb

Constant Summary collapse

MATCHER =
/swiffyobject\s*?=\s*?(\{.*\})/

Instance Attribute Summary collapse

Instance Method Summary collapse

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_blobObject (readonly)

Returns the value of attribute json_blob.



3
4
5
# File 'lib/swftly/converted.rb', line 3

def json_blob
  @json_blob
end

#markupObject (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_definitionObject



9
10
11
12
# File 'lib/swftly/converted.rb', line 9

def json_definition
  @json_blob ||= @markup.match(MATCHER).to_s
  @json_blob
end