Class: Deproll::Post

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/deproll.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gems) ⇒ Post

Returns a new instance of Post.


24
25
26
# File 'lib/deproll.rb', line 24

def initialize(gems)
  @gems = gems
end

Instance Attribute Details

#gemsObject (readonly)

Returns the value of attribute gems


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

def gems
  @gems
end

Instance Method Details

#dependenciesObject


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

def dependencies
  gems.map(&:to_hash)
end

#optionsObject


37
38
39
# File 'lib/deproll.rb', line 37

def options
  { :dependencies => dependencies }
end

#postObject


28
29
30
31
# File 'lib/deproll.rb', line 28

def post
  puts options.inspect
  self.class.post('/projects/1/stages/1/dependencies', :query => options) # again hard coded
end