Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Gist #8 For "Functional Programming Techniques With Ruby: Part I"
class CssBlock
# ...
def set(key, value = nil)
new_properties = if key.is_a?(Hash)
key
elsif !value.nil?
{
key => value
}
else
raise "Either provide a Hash of values, or a key and value."
end
self.class.new(self.selector, self.properties.merge(new_properties))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.