class Owldiff::OntologyChange

Constants

ACTIONS

Attributes

action[RW]
data[RW]
type[RW]
value[RW]

Public Class Methods

from_hash(hash) click to toggle source
# File lib/owldiff/ontology_change.rb, line 19
def self.from_hash hash
  OntologyChange.new(hash["value"],hash["type"],hash["action"],hash["data"])
end
new(value, type, action, data) click to toggle source
# File lib/owldiff/ontology_change.rb, line 6
def initialize value, type, action, data
  @value, @type, @action, @data =  value, type, action, data
end

Public Instance Methods

to_json(*opts) click to toggle source
# File lib/owldiff/ontology_change.rb, line 10
def to_json(*opts)
  {
    'value' => value,
    'type' => type.to_s,
    'action' => action.to_s,
    'data' => data
  }.to_json(*opts)
end