Class: DNApi::Components::Metadata
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- DNApi::Components::Metadata
show all
- Includes:
- DNApi::Component
- Defined in:
- lib/dnapi/components/metadata.rb
Instance Method Summary
collapse
[], #can_belong_to?, components, from, included, #key, #to_hash
Instance Method Details
#[](key) ⇒ Object
10
11
12
|
# File 'lib/dnapi/components/metadata.rb', line 10
def [](key)
self.send(key)
end
|
#to_json(*args) ⇒ Object
15
16
17
18
19
|
# File 'lib/dnapi/components/metadata.rb', line 15
def to_json(*args)
vals = @table.clone
vals.delete :parent
JSON.dump(({:key => key}).merge(vals))
end
|