Class: Mago::MagicNumber
- Inherits:
-
Object
- Object
- Mago::MagicNumber
- Defined in:
- lib/mago/magic_number.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ MagicNumber
constructor
A new instance of MagicNumber.
Constructor Details
#initialize(attrs = {}) ⇒ MagicNumber
Returns a new instance of MagicNumber.
7 8 9 10 11 |
# File 'lib/mago/magic_number.rb', line 7 def initialize(attrs = {}) attrs.each do |attr, value| send("#{attr}=", value) end end |
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
5 6 7 |
# File 'lib/mago/magic_number.rb', line 5 def file @file end |
#line ⇒ Object
Returns the value of attribute line.
4 5 6 |
# File 'lib/mago/magic_number.rb', line 4 def line @line end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/mago/magic_number.rb', line 3 def value @value end |