class BigKeeper::Podfile_Modle
Attributes
branch[RW]
comment[RW]
configurations[RW]
git[RW]
name[RW]
path[RW]
tag[RW]
Public Class Methods
new(sentence)
click to toggle source
# File lib/big_keeper/model/podfile_model.rb, line 6 def initialize(sentence) if sentence.include?('#') list = sentence.split('#') @comment = list[1] sentence = list[0] end sentence_slip_list = sentence.split(',') return if sentence_slip_list.size.zero? for piece in sentence_slip_list do if /:git =>/ =~ piece @git = $~.post_match.strip elsif /:path =>/ =~ piece @path = $~.post_match.strip elsif /:configurations =>/ =~ piece @configurations = $~.post_match.strip elsif /:branch =>/ =~ piece @branch = $~.post_match.strip elsif /:tag =>/ =~ piece @tag = $~.post_match.strip elsif /pod /=~ piece @name = $~.post_match.delete("'\n ") end # p %Q{model name:#{@name},git:#{@git},path:#{@path},config:#{@configurations},branch:#{@branch},tag:#{@tag},comment:#{@comment}} end end