Class: Midos::Base
- Inherits:
-
Object
- Object
- Midos::Base
- Defined in:
- lib/midos/base.rb
Instance Attribute Summary collapse
-
#auto_id ⇒ Object
Returns the value of attribute auto_id.
-
#fs ⇒ Object
Returns the value of attribute fs.
-
#io ⇒ Object
Returns the value of attribute io.
-
#key ⇒ Object
Returns the value of attribute key.
-
#le ⇒ Object
Returns the value of attribute le.
-
#nl ⇒ Object
Returns the value of attribute nl.
-
#rs ⇒ Object
Returns the value of attribute rs.
-
#vs ⇒ Object
readonly
Returns the value of attribute vs.
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ Base
constructor
A new instance of Base.
- #reset ⇒ Object
Constructor Details
#initialize(options = {}, &block) ⇒ Base
Returns a new instance of Base.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/midos/base.rb', line 52 def initialize( = {}, &block) self.key = [:key] self.rs = .fetch(:rs, DEFAULT_RS) self.fs = .fetch(:fs, DEFAULT_FS) self.vs = .fetch(:vs, DEFAULT_VS) self.nl = .fetch(:nl, DEFAULT_NL) self.le = .fetch(:le, DEFAULT_LE) self.io = .fetch(:io, self.class::DEFAULT_IO) @auto_id_block = .fetch(:auto_id, block) reset end |
Instance Attribute Details
#auto_id ⇒ Object
Returns the value of attribute auto_id.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def auto_id @auto_id end |
#fs ⇒ Object
Returns the value of attribute fs.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def fs @fs end |
#io ⇒ Object
Returns the value of attribute io.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def io @io end |
#key ⇒ Object
Returns the value of attribute key.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def key @key end |
#le ⇒ Object
Returns the value of attribute le.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def le @le end |
#nl ⇒ Object
Returns the value of attribute nl.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def nl @nl end |
#rs ⇒ Object
Returns the value of attribute rs.
67 68 69 |
# File 'lib/midos/base.rb', line 67 def rs @rs end |
#vs ⇒ Object (readonly)
Returns the value of attribute vs.
69 70 71 |
# File 'lib/midos/base.rb', line 69 def vs @vs end |
Instance Method Details
#reset ⇒ Object
71 72 73 |
# File 'lib/midos/base.rb', line 71 def reset @auto_id = @auto_id_block ? @auto_id_block.call : default_auto_id end |