class MotionSwifty::Cart
Attributes
definition[RW]
options[RW]
Public Class Methods
new(definition, options = {})
click to toggle source
# File lib/motion/swifty/cart.rb, line 6 def initialize(definition, options = {}) @definition = definition @options = options end
Public Instance Methods
name()
click to toggle source
# File lib/motion/swifty/cart.rb, line 11 def name self.options.fetch(:name) do if match = @definition.match(/.* ".*\/(.*?)"/i) match.captures.first else raise "Couldn’t extract cart name from its Cartfile definition" end end end
path(plaform = "iOS")
click to toggle source
# File lib/motion/swifty/cart.rb, line 21 def path(plaform = "iOS") File.expand_path("./Carthage/Build/#{plaform}/#{name}.framework") end