revieve volt scaffold

This commit is contained in:
Torsten Ruger
2015-07-29 17:13:04 +03:00
parent 79383d89b1
commit 485f3134dd
19 changed files with 830 additions and 83 deletions

13
models/block_model.rb Normal file
View File

@@ -0,0 +1,13 @@
# represent a block and hold the actual instance (as transient)
class BlockModel < Volt::Model
field :name
attr_accessor :block
def initialize(b)
super()
@block = b
self.name = b.nil? ? 'undefined' : b.name
end
end

View File

@@ -0,0 +1,13 @@
# represent an instruction and hold the actual instance (as transient)
class InstructionModel < Volt::Model
field :name
attr_accessor :instruction
def initialize(i)
super()
@instruction = i
self.name = i.class.name
end
end