Skip to content

Commit

Permalink
Provide container to hold unsupported provider specific attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts committed Apr 8, 2015
1 parent 5f5d68c commit 91309be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/miasma/types/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Model < Data

include Utils::Memoization

attribute :custom, Smash, :coerce => lambda{|v| v.to_smash}, :default => Smash.new

# @return [Miasma::Types::Api] underlying service API
attr_reader :api

Expand Down Expand Up @@ -42,6 +44,7 @@ def initialize(api, model_data=nil)
raise TypeError.new "Expecting `model_data` to be of type `Hash`. Received: `#{model_data.class}`"
end
end
self.custom = {}
end

# Save changes to the model
Expand Down

0 comments on commit 91309be

Please sign in to comment.