Class: Fontist::FontMatch
- Inherits:
-
Object
- Object
- Fontist::FontMatch
- Defined in:
- lib/fontist/font_finder.rb
Overview
Result object for font matches
Instance Attribute Summary collapse
-
#axes ⇒ Object
readonly
Returns the value of attribute axes.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
-
#initialize(name:, resource: nil, axes: [], format: nil, category: nil, resources: nil) ⇒ FontMatch
constructor
A new instance of FontMatch.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, resource: nil, axes: [], format: nil, category: nil, resources: nil) ⇒ FontMatch
Returns a new instance of FontMatch.
133 134 135 136 137 138 139 140 141 |
# File 'lib/fontist/font_finder.rb', line 133 def initialize(name:, resource: nil, axes: [], format: nil, category: nil, resources: nil) @name = name @resource = resource @axes = axes @format = format @category = category @resources = resources end |
Instance Attribute Details
#axes ⇒ Object (readonly)
Returns the value of attribute axes.
131 132 133 |
# File 'lib/fontist/font_finder.rb', line 131 def axes @axes end |
#category ⇒ Object (readonly)
Returns the value of attribute category.
131 132 133 |
# File 'lib/fontist/font_finder.rb', line 131 def category @category end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
131 132 133 |
# File 'lib/fontist/font_finder.rb', line 131 def format @format end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
131 132 133 |
# File 'lib/fontist/font_finder.rb', line 131 def name @name end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
131 132 133 |
# File 'lib/fontist/font_finder.rb', line 131 def resource @resource end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
131 132 133 |
# File 'lib/fontist/font_finder.rb', line 131 def resources @resources end |
Instance Method Details
#to_h ⇒ Object
143 144 145 146 147 148 149 150 151 152 |
# File 'lib/fontist/font_finder.rb', line 143 def to_h { name: name, resource: resource, resources: resources, axes: axes, format: format, category: category, }.compact end |