Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/config/initializers/core_ext.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#human_varObject

Returns the value of attribute human_var.



9
10
11
# File 'lib/config/initializers/core_ext.rb', line 9

def human_var
  @human_var
end

#testObject

Returns the value of attribute test.



9
10
11
# File 'lib/config/initializers/core_ext.rb', line 9

def test
  @test
end

Class Method Details

.humanizable(method) ⇒ Object



11
12
13
14
15
# File 'lib/config/initializers/core_ext.rb', line 11

def self.humanizable(method)
  define_method :human do
    @human_var ||= HumanApi::Human.new(access_token: self.send(method.to_sym))
  end
end