Class: SmartIconsConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/motion/project/smarticons.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#textObject

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_textObject



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