Class: Prima

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrima

Returns a new instance of Prima.



10
11
12
13
14
# File 'lib/prima_twig.rb', line 10

def initialize
  @twig = Twig.new(:read_options => true, :max_days_old => 30)
  @rugged = Rugged::Repository.new('.')
  create_clients
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object

proxy di tutti i metodi a rugged



23
24
25
# File 'lib/prima_twig.rb', line 23

def method_missing(method)
  @rugged.send method
end

Instance Attribute Details

#ruggedObject (readonly)

Returns the value of attribute rugged.



8
9
10
# File 'lib/prima_twig.rb', line 8

def rugged
  @rugged
end

#twigObject (readonly)

Returns the value of attribute twig.



8
9
10
# File 'lib/prima_twig.rb', line 8

def twig
  @twig
end

Instance Method Details

#create_clientsObject



16
17
18
19
20
# File 'lib/prima_twig.rb', line 16

def create_clients
  Aws.config.update({
    region: 'eu-west-1'
  })
end