Class: Vic::Link
- Inherits:
-
Object
- Object
- Vic::Link
- Defined in:
- lib/vic/link.rb
Instance Attribute Summary collapse
-
#from_group ⇒ Object
Returns the value of attribute from_group.
-
#to_group ⇒ Object
Returns the value of attribute to_group.
Instance Method Summary collapse
-
#force! ⇒ TrueClass
Set the force setting to true.
-
#force=(bool) ⇒ TrueClass, FalseClass
Set the force.
-
#force? ⇒ TrueClass, FalseClass
Return the force setting.
-
#initialize(from_group, to_group = :NONE) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(from_group, to_group = :NONE) ⇒ Link
Returns a new instance of Link.
5 6 7 8 9 |
# File 'lib/vic/link.rb', line 5 def initialize(from_group, to_group = :NONE) @from_group = from_group @to_group = to_group @force = false end |
Instance Attribute Details
#from_group ⇒ Object
Returns the value of attribute from_group.
3 4 5 |
# File 'lib/vic/link.rb', line 3 def from_group @from_group end |
#to_group ⇒ Object
Returns the value of attribute to_group.
3 4 5 |
# File 'lib/vic/link.rb', line 3 def to_group @to_group end |
Instance Method Details
#force! ⇒ TrueClass
Set the force setting to true
40 41 42 |
# File 'lib/vic/link.rb', line 40 def force! @force = true end |
#force=(bool) ⇒ TrueClass, FalseClass
Set the force
20 21 22 |
# File 'lib/vic/link.rb', line 20 def force=(bool) @force = !!bool end |
#force? ⇒ TrueClass, FalseClass
Return the force setting
30 31 32 |
# File 'lib/vic/link.rb', line 30 def force? @force end |