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.



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

def initialize(value)
  @value = value
end

Instance Method Details

#messageObject



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

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

  MessageWrapper.new(@value)
end

#to_sObject



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

def to_s
  @value.to_s
end