Class: WifiWand::Platforms::Selection::Base
- Inherits:
-
Struct
- Object
- Struct
- WifiWand::Platforms::Selection::Base
- Defined in:
- lib/wifi_wand/platforms/selection/base.rb
Instance Attribute Summary collapse
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #create_model(_options) ⇒ Object
- #current_os_is_this_os? ⇒ Boolean
-
#initialize(id, display_name) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(id, display_name) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 16 17 18 19 |
# File 'lib/wifi_wand/platforms/selection/base.rb', line 11 def initialize(id, display_name) instantiated_by_subclass = (self.class.name != WifiWand::Platforms::Selection::Base.name) if instantiated_by_subclass super else # Prohibit Base.new call raise NonSubclassInstantiationError end end |
Instance Attribute Details
#display_name ⇒ Object
Returns the value of attribute display_name
10 11 12 |
# File 'lib/wifi_wand/platforms/selection/base.rb', line 10 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id
10 11 12 |
# File 'lib/wifi_wand/platforms/selection/base.rb', line 10 def id @id end |
Instance Method Details
#create_model(_options) ⇒ Object
23 |
# File 'lib/wifi_wand/platforms/selection/base.rb', line 23 def create_model() = raise MethodNotImplementedError |
#current_os_is_this_os? ⇒ Boolean
21 |
# File 'lib/wifi_wand/platforms/selection/base.rb', line 21 def current_os_is_this_os? = raise MethodNotImplementedError |