Created
April 25, 2012 18:03
-
-
Save sagevann/2491723 to your computer and use it in GitHub Desktop.
simple ruby needs meta ruby help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClipModel | |
attr_accessor :type, :owner, :time, :count, :title, :url, :description, :quote, :one_liner, :sponsored, :image, :characters, :actors | |
@@clip = {} | |
def initialize(clip) | |
@@clip = clip | |
end | |
def raw | |
@@clip | |
end | |
def type | |
@@clip["type"] | |
end | |
def owner | |
@@clip["owner"] | |
end | |
def time | |
@@clip["time"] | |
end | |
def count | |
@@clip["count"] | |
end | |
def title | |
@@clip["title"] | |
end | |
def url | |
@@clip["url"] | |
end | |
def description | |
@@clip["description"] | |
end | |
def quote | |
@@clip["quote"] | |
end | |
def one_liner | |
@@clip["one_liner"] | |
end | |
def sponsored | |
@@clip["sponsored"] | |
end | |
def image | |
@@clip["image"] | |
end | |
def characters | |
@@clip["characters"] | |
end | |
def actors | |
@@clip["actors"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment