class Mundler::Config
Attributes
env[R]
mruby[R]
platform_types[R]
Public Class Methods
new()
click to toggle source
# File lib/mundler/config.rb, line 3 def initialize @mruby = { url: "https://github.com/mruby/mruby", branch: "stable" } @platforms = [] @gemboxes = [] @gems = [] @platform_types = {} @env = {} end
Public Instance Methods
gemboxes()
click to toggle source
# File lib/mundler/config.rb, line 24 def gemboxes @gemboxes.sort! end
gems()
click to toggle source
# File lib/mundler/config.rb, line 28 def gems @gems.sort_by! { |platform| platform[:name] } end
hex()
click to toggle source
# File lib/mundler/config.rb, line 20 def hex Digest::MD5.hexdigest(to_s) end
platforms()
click to toggle source
# File lib/mundler/config.rb, line 32 def platforms @platforms.sort_by! { |platform| platform[:name] } end
to_s()
click to toggle source
# File lib/mundler/config.rb, line 36 def to_s <<~HASHABLE #{mruby.inspect} #{platforms.inspect} #{platform_types.keys.sort.inspect} #{hashable_string_for_hash(env)} #{gemboxes.inspect} #{gems.inspect} HASHABLE end
Private Instance Methods
hashable_string_for_hash(hash)
click to toggle source
# File lib/mundler/config.rb, line 49 def hashable_string_for_hash(hash) str = "{" sorted_keys = hash.keys.sort sorted_keys.each do |key| str = str + "#{key}=>#{hash[key]}" end str + "}" end