Class: Workarea::Storefront::ContentBlocks::HeroViewModel
Instance Method Summary
collapse
#asset_alt_text, #assets, #find_asset, #locals, #partial, #series, wrap
Instance Method Details
17
18
19
|
# File 'app/view_models/workarea/storefront/content_blocks/hero_view_model.rb', line 17
def button_position_class
"hero-content-block__button--#{data[:position].optionize.dasherize}"
end
|
9
10
11
12
13
14
15
|
# File 'app/view_models/workarea/storefront/content_blocks/hero_view_model.rb', line 9
def button_style_class
classes = ['button']
classes << 'button--large' if data[:style] == 'Large'
classes << 'button--small' if data[:style] == 'Small'
classes.join(' ')
end
|
#image ⇒ Object
5
6
7
|
# File 'app/view_models/workarea/storefront/content_blocks/hero_view_model.rb', line 5
def image
find_asset(data[:asset])
end
|