Class: RiakDt::Set
- Inherits:
-
Object
- Object
- RiakDt::Set
- Defined in:
- lib/riak-dt-ruby/set.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #add(atom) ⇒ Object
- #contents ⇒ Object
-
#initialize(name) ⇒ Set
constructor
A new instance of Set.
- #remove(atom) ⇒ Object
Constructor Details
#initialize(name) ⇒ Set
Returns a new instance of Set.
4 5 6 7 |
# File 'lib/riak-dt-ruby/set.rb', line 4 def initialize(name) self.name = name @encoded_name = CGI.escape name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/riak-dt-ruby/set.rb', line 3 def name @name end |
Instance Method Details
#add(atom) ⇒ Object
9 10 11 12 |
# File 'lib/riak-dt-ruby/set.rb', line 9 def add(atom) RiakDt.client.post "/sets/#{@encoded_name}/add", atom nil end |