Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
5981e6ca
Commit
5981e6ca
authored
Apr 21, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Pod::Command::Presenter#detail] minor semplification
parent
5832226c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
presenter.rb
lib/cocoapods/command/presenter.rb
+5
-8
No files found.
lib/cocoapods/command/presenter.rb
View file @
5981e6ca
...
...
@@ -2,7 +2,7 @@ module Pod
class
Command
class
Presenter
def
self
.
options
" --stats Show additional stats (like GitHub watchers and forks)
\n
"
[[
"--stats"
,
"Show additional stats (like GitHub watchers and forks)"
]]
end
autoload
:CocoaPod
,
'cocoapods/command/presenter/cocoa_pod'
...
...
@@ -43,18 +43,15 @@ module Pod
txt
.
strip
.
gsub
(
/(.{1,
#{
col
}
})( +|$)\n?|(.{
#{
col
}
})/
,
indent
+
"
\\
1
\\
3
\n
"
)
end
def
detail
(
title
,
value
,
preferred_indentation
=
8
)
# 8 is the length of Homepage
def
detail
(
title
,
value
)
return
''
if
!
value
number_of_spaces
=
((
preferred_indentation
-
title
.
length
)
>
0
)
?
(
preferred_indentation
-
title
.
length
)
:
0
spaces
=
' '
*
number_of_spaces
''
.
tap
do
|
t
|
t
<<
" -
#{
title
}
:"
t
<<
" -
#{
title
}
:"
.
ljust
(
16
)
if
value
.
class
==
Array
separator
=
"
\n
- "
t
<<
separator
+
value
.
join
(
separator
)
t
<<
separator
<<
value
.
join
(
separator
)
else
t
<<
"
#{
spaces
+
value
.
to_s
}
\n
"
t
<<
value
.
to_s
<<
"
\n
"
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment