Class: SmartIconsConfig
- Inherits:
-
Object
- Object
- SmartIconsConfig
- Defined in:
- lib/motion/project/smarticons.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #build! ⇒ Object
- #default_text ⇒ Object
-
#initialize(config) ⇒ SmartIconsConfig
constructor
A new instance of SmartIconsConfig.
Constructor Details
#initialize(config) ⇒ SmartIconsConfig
Returns a new instance of SmartIconsConfig.
10 11 12 |
# File 'lib/motion/project/smarticons.rb', line 10 def initialize(config) @config = config end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/motion/project/smarticons.rb', line 8 def text @text end |
Instance Method Details
#build! ⇒ Object
14 15 16 |
# File 'lib/motion/project/smarticons.rb', line 14 def build! create_icons end |
#default_text ⇒ Object
24 25 26 27 28 29 |
# File 'lib/motion/project/smarticons.rb', line 24 def default_text commit = `git rev-parse --short HEAD`.strip branch=`git rev-parse --abbrev-ref HEAD` app_version = @config.version "#{app_version} #{branch} #{commit}" end |