Class: Fontist::Import::Google::MetadataAdapter::ValueWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/fontist/import/google/metadata_adapter.rb

Overview

Helper class to wrap values

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ValueWrapper

Returns a new instance of ValueWrapper.



226
227
228
# File 'lib/fontist/import/google/metadata_adapter.rb', line 226

def initialize(value)
  @value = value
end

Instance Method Details

#messageObject



234
235
236
237
238
# File 'lib/fontist/import/google/metadata_adapter.rb', line 234

def message
  return nil unless @value.is_a?(Hash)

  MessageWrapper.new(@value)
end

#to_sObject



230
231
232
# File 'lib/fontist/import/google/metadata_adapter.rb', line 230

def to_s
  @value.to_s
end