Class: Estratto::Register
- Inherits:
-
Object
- Object
- Estratto::Register
- Defined in:
- lib/estratto/register.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#register_layout ⇒ Object
readonly
Returns the value of attribute register_layout.
Instance Method Summary collapse
-
#initialize(line, register_layout) ⇒ Register
constructor
A new instance of Register.
- #refine ⇒ Object
Constructor Details
#initialize(line, register_layout) ⇒ Register
Returns a new instance of Register.
8 9 10 11 |
# File 'lib/estratto/register.rb', line 8 def initialize(line, register_layout) @line = line @register_layout = register_layout end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/estratto/register.rb', line 6 def line @line end |
#register_layout ⇒ Object (readonly)
Returns the value of attribute register_layout.
6 7 8 |
# File 'lib/estratto/register.rb', line 6 def register_layout @register_layout end |
Instance Method Details
#refine ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/estratto/register.rb', line 13 def refine register_layout.map do |layout| { layout['name'].to_sym => coerced_data(layout['range'], layout['type'], layout['formats']) } end.inject(&:merge) end |