Class: Pakyow::Framework

Inherits:
Object
  • Object
show all
Defined in:
lib/pakyow/framework.rb

Overview

Base framework class.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Framework

Returns a new instance of Framework.



35
36
37
# File 'lib/pakyow/framework.rb', line 35

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



33
34
35
# File 'lib/pakyow/framework.rb', line 33

def object
  @object
end

Class Method Details

.Framework(name) ⇒ Object

rubocop:disable Naming/MethodName



11
12
13
14
15
# File 'lib/pakyow/framework.rb', line 11

def Framework(name)
  Class.new(self) do
    @framework_name = name
  end
end

.inherited(framework_class) ⇒ Object

rubocop:enabled Naming/MethodName



18
19
20
21
22
23
# File 'lib/pakyow/framework.rb', line 18

def inherited(framework_class)
  super

  return unless instance_variable_defined?(:@framework_name)
  Pakyow.register_framework(@framework_name, framework_class)
end