Class: Raven::Interface

Inherits:
Object
  • Object
show all
Includes:
BetterAttrAccessor
Defined in:
lib/raven/interfaces.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BetterAttrAccessor

#attributes, included

Constructor Details

#initialize(attributes = nil) {|_self| ... } ⇒ Interface

Returns a new instance of Interface.

Yields:

  • (_self)

Yield Parameters:



11
12
13
14
15
16
17
# File 'lib/raven/interfaces.rb', line 11

def initialize(attributes = nil)
  attributes.each do |attr, value|
    send "#{attr}=", value
  end if attributes

  yield self if block_given?
end

Class Method Details

.name(value = nil) ⇒ Object



19
20
21
# File 'lib/raven/interfaces.rb', line 19

def self.name(value = nil)
  @interface_name ||= value
end