Class: Soybean::Interface
- Inherits:
-
Object
- Object
- Soybean::Interface
- Includes:
- ActiveSupport::Callbacks
- Defined in:
- lib/soybean/interface.rb
Constant Summary collapse
- NO_ACTIONS =
[:endpoint]
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Class Method Summary collapse
Instance Method Summary collapse
- #endpoint ⇒ Object
-
#initialize(logger = Soybean.logger) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(logger = Soybean.logger) ⇒ Interface
Returns a new instance of Interface.
24 25 26 |
# File 'lib/soybean/interface.rb', line 24 def initialize(logger=Soybean.logger) @logger = logger end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
22 23 24 |
# File 'lib/soybean/interface.rb', line 22 def logger @logger end |
Class Method Details
.actions(implemented = true) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/soybean/interface.rb', line 14 def self.actions(implemented=true) if implemented self.public_instance_methods(false) - NO_ACTIONS else self::Methods.map(&:second).map(&:to_sym) end end |
Instance Method Details
#endpoint ⇒ Object
28 29 30 |
# File 'lib/soybean/interface.rb', line 28 def endpoint self.class.name end |