Skip to content

Commit

Permalink
Add optional local path storage to Resource object.
Browse files Browse the repository at this point in the history
  • Loading branch information
fotinakis committed Jun 4, 2015
1 parent 2167c5d commit 25310e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/percy/client/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Resource
attr_accessor :is_root
attr_accessor :mimetype
attr_accessor :content
attr_accessor :path

def initialize(resource_url, options = {})
@resource_url = resource_url
Expand All @@ -24,9 +25,10 @@ def initialize(resource_url, options = {})
@is_root = options[:is_root]
@mimetype = options[:mimetype]

# For user convenience of temporarily storing content with other data, but the actual data
# is never included when serialized.
# For optional convenience of temporarily storing the local content and path with this
# object. These are never included when serialized.
@content = options[:content]
@path = options[:path]
end

def serialize
Expand Down

0 comments on commit 25310e8

Please sign in to comment.