Class: Taksi::Component

Inherits:
Module
  • Object
show all
Defined in:
lib/taksi/component.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier) ⇒ Component

Returns a new instance of Component.



7
8
9
10
# File 'lib/taksi/component.rb', line 7

def initialize(identifier)
  @identifier = identifier
  super()
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



5
6
7
# File 'lib/taksi/component.rb', line 5

def identifier
  @identifier
end

Instance Method Details

#included(klass) ⇒ Object



12
13
14
15
16
17
# File 'lib/taksi/component.rb', line 12

def included(klass)
  klass.extend(ClassMethods)
  klass.include(InstanceMethods)

  klass.definition = self
end