Class: Goat::ComponentUpdate
Instance Attribute Summary collapse
-
#mutations ⇒ Object
readonly
Returns the value of attribute mutations.
-
#skel ⇒ Object
readonly
Returns the value of attribute skel.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(skel, mutations) ⇒ ComponentUpdate
constructor
A new instance of ComponentUpdate.
- #to_hash ⇒ Object
Constructor Details
#initialize(skel, mutations) ⇒ ComponentUpdate
Returns a new instance of ComponentUpdate.
48 49 50 51 |
# File 'lib/goat/common.rb', line 48 def initialize(skel, mutations) @skel = skel @mutations = mutations end |
Instance Attribute Details
#mutations ⇒ Object (readonly)
Returns the value of attribute mutations.
45 46 47 |
# File 'lib/goat/common.rb', line 45 def mutations @mutations end |
#skel ⇒ Object (readonly)
Returns the value of attribute skel.
45 46 47 |
# File 'lib/goat/common.rb', line 45 def skel @skel end |
#version ⇒ Object
Returns the value of attribute version.
46 47 48 |
# File 'lib/goat/common.rb', line 46 def version @version end |
Class Method Details
.from_hash(h) ⇒ Object
60 61 62 |
# File 'lib/goat/common.rb', line 60 def self.from_hash(h) self.new(ComponentSkeleton.from_hash(h['skel']), h['mutations']) end |
Instance Method Details
#to_hash ⇒ Object
53 54 55 56 57 58 |
# File 'lib/goat/common.rb', line 53 def to_hash { 'skel' => @skel.to_hash, 'mutations' => @mutations } end |