Class: Rews::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/rews/update.rb

Direct Known Subclasses

AppendToItemField, DeleteItemField, SetItemField

Defined Under Namespace

Modules: Xml

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field_uri, item_expr = nil) ⇒ Update

Returns a new instance of Update.



6
7
8
9
# File 'lib/rews/update.rb', line 6

def initialize(field_uri, item_expr=nil)
  @field_uri = field_uri
  @item_expr = item_expr
end

Instance Attribute Details

#field_uriObject (readonly)

Returns the value of attribute field_uri.



3
4
5
# File 'lib/rews/update.rb', line 3

def field_uri
  @field_uri
end

#item_exprObject (readonly)

Returns the value of attribute item_expr.



4
5
6
# File 'lib/rews/update.rb', line 4

def item_expr
  @item_expr
end

Instance Method Details

#inspectObject



11
12
13
# File 'lib/rews/update.rb', line 11

def inspect
  "#<#{Xml.update_tag(self.class)} @field_uri=#{@field_uri}, @item_expr=#{@item_expr.inspect}>"
end

#to_xmlObject



15
16
17
# File 'lib/rews/update.rb', line 15

def to_xml
  Xml.write_update(self.class, field_uri, item_expr)
end