Class: Option::Base
- Inherits:
-
Object
- Object
- Option::Base
- Defined in:
- lib/option/base.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#common_name ⇒ Object
Returns the value of attribute common_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(common_name, attributes) ⇒ Base
constructor
A new instance of Base.
- #server_virtual_ip ⇒ Object
- #virtual_ip ⇒ Object
Constructor Details
#initialize(common_name, attributes) ⇒ Base
Returns a new instance of Base.
17 18 19 20 |
# File 'lib/option/base.rb', line 17 def initialize(common_name, attributes) @common_name = common_name @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/option/base.rb', line 3 def attributes @attributes end |
#common_name ⇒ Object
Returns the value of attribute common_name.
3 4 5 |
# File 'lib/option/base.rb', line 3 def common_name @common_name end |
Class Method Details
.activate(common_name, attributes = {}) ⇒ Object
6 7 8 9 |
# File 'lib/option/base.rb', line 6 def activate(common_name, attributes={}) option_object = new(common_name, attributes) option_object.activate! end |
.deactivate(common_name, attributes = {}) ⇒ Object
11 12 13 14 |
# File 'lib/option/base.rb', line 11 def deactivate(common_name, attributes={}) option_object = new(common_name, attributes) option_object.deactivate! end |
Instance Method Details
#server_virtual_ip ⇒ Object
26 27 28 |
# File 'lib/option/base.rb', line 26 def server_virtual_ip System::OpenvpnStatus.server_virtual_address end |
#virtual_ip ⇒ Object
22 23 24 |
# File 'lib/option/base.rb', line 22 def virtual_ip System::OpenvpnStatus.current_virtual_address end |