Class: WO::Configure
- Inherits:
-
Object
- Object
- WO::Configure
- Defined in:
- lib/wo/configure.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configure
constructor
A new instance of Configure.
- #to_h ⇒ Object
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( = {}) [:token, :repo, :branch, :user_name].each do |key| next unless value = [key] instance_variable_set(:"@#{key}", value) end end |
Instance Method Details
#to_h ⇒ Object
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 |