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.
60 61 62 63 |
# File 'lib/goat/common.rb', line 60 def initialize(skel, mutations) @skel = skel @mutations = mutations end |
Instance Attribute Details
#mutations ⇒ Object (readonly)
Returns the value of attribute mutations.
57 58 59 |
# File 'lib/goat/common.rb', line 57 def mutations @mutations end |
#skel ⇒ Object (readonly)
Returns the value of attribute skel.
57 58 59 |
# File 'lib/goat/common.rb', line 57 def skel @skel end |
#version ⇒ Object
Returns the value of attribute version.
58 59 60 |
# File 'lib/goat/common.rb', line 58 def version @version end |
Class Method Details
.from_hash(h) ⇒ Object
72 73 74 |
# File 'lib/goat/common.rb', line 72 def self.from_hash(h) self.new(ComponentSkeleton.from_hash(h['skel']), h['mutations']) end |
Instance Method Details
#to_hash ⇒ Object
65 66 67 68 69 70 |
# File 'lib/goat/common.rb', line 65 def to_hash { 'skel' => @skel.to_hash, 'mutations' => @mutations } end |