(Not documented)
# File lib/wonderfl/code.rb, line 7 def initialize(payload, code_id = nil) raise TypeError 'Hash argument expected' unless payload.is_a? Hash @code_id = code_id @compile_ok = payload['compile_ok'].to_i @created_date = parse_time(payload['created_date']) @id = payload['id'] @license = payload['license'] @parent = payload['parent'] @swf = payload['swf'] @thumbnail = payload['thumbnail'] @title = payload['title'] if code_id @as3 = payload['as3'] @diff = payload['diff'].to_i @favorite_count = payload['favorite_count'].to_i @forked_count = payload['forked_count'].to_i @modified_date = parse_time(payload['modified_date']) end if payload['user'] @user_icon = payload['user']['icon'] @user_name = payload['user']['name'] end end
(Not documented)
# File lib/wonderfl/code.rb, line 31 def to_s if @code_id "Wonderfl::Code {\nthumbnail => \#{@thumbnail}\nparent => \#{@parent}\nmodified_date => \#{@modified_date}\ncompile_ok => \#{@compile_ok}\ncreated_date => \#{@created_date}\nforked_count => \#{@forked_count}\nlicense => \#{@license}\nswf => \#{@swf}\ndiff => \#{@diff}\nuser_icon => \#{@user_icon}\nuser_name => \#{@user_name}\ntitle => \#{@title}\nid => \#{@id}\nfavorite_count => \#{@favorite_count}\n}\n" end end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.