Class: WO::Configure

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configure

Returns a new instance of Configure.



3
4
5
6
7
8
# File 'lib/wo/configure.rb', line 3

def initialize(options = {})
  [:token, :repo, :branch, :user_name].each do |key|
    next unless value = options[key]
    instance_variable_set(:"@#{key}", value)
  end
end

Instance Method Details

#to_hObject



10
11
12
13
14
15
16
17
# File 'lib/wo/configure.rb', line 10

def to_h
  {
    "organization[token]": @token,
    "doing[repo]":         @repo,
    "doing[branch]":       @branch,
    "user[name]":          @user_name,
  }
end