Class: SwfRuby::Swf::ActionPush
- Inherits:
-
Object
- Object
- SwfRuby::Swf::ActionPush
- Defined in:
- lib/swf_ruby/swf/action_push.rb
Overview
ActionPushタグ.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#data_type ⇒ Object
readonly
Returns the value of attribute data_type.
Instance Method Summary collapse
-
#initialize(action_record) ⇒ ActionPush
constructor
A new instance of ActionPush.
Constructor Details
#initialize(action_record) ⇒ ActionPush
Returns a new instance of ActionPush.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/swf_ruby/swf/action_push.rb', line 10 def initialize(action_record) raise NotActionPushError if action_record.code != 0x96 ad = action_record.data @data_type = ad[0].chr.unpack("C").first @data = nil d = ad[1..-1] case @data_type when 0 @data = d when 1 @data = d.unpack("e") when 4,5,8 @data = d.unpack("C") when 6 @data = d.unpack("E") when 7 @data = d.unpack("V") when 9 @data = d.unpack("v") end end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/swf_ruby/swf/action_push.rb', line 8 def data @data end |
#data_type ⇒ Object (readonly)
Returns the value of attribute data_type.
7 8 9 |
# File 'lib/swf_ruby/swf/action_push.rb', line 7 def data_type @data_type end |